<commit_before><?php

namespace Morfeu\Bundle\UserBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

class ProfileController extends Controller
{

    private $userProfileService;

    private function getUserProfileService()
    {
        if(!$this->userPRofileService){
            $this->userProfileService = $this->get('userProfile.service');
        }

        return $this->userProfileService;
    }

    public function indexAction()
    {
        $entity = $this->getUser();

        return $this->render('UserBundle:Profile:index.html.twig', array(
            'entity' => $entity
        ));
    }
}<commit_msg>Developed the user form<commit_after><?php

namespace Morfeu\Bundle\UserBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Morfeu\Bundle\UserBundle\Form\UserType;
use Morfeu\Bundle\EntityBundle\Entity\User;

class ProfileController extends Controller
{

    private $userProfileService;

    private function getUserProfileService()
    {
        if (!$this->userPRofileService) {
            $this->userProfileService = $this->get('userProfile.service');
        }

        return $this->userProfileService;
    }

    public function indexAction()
    {
        $entity = $this->getUser();
        $form = $this->createUpdateForm($entity);

        return $this->render('UserBundle:Profile:index.html.twig', array(
            'entity' => $entity,
            'form' => $form->createView(),
        ));
    }

    private function createUpdateForm(User $entity)
    {

        $form = $this->createForm(new UserType(), $entity, array(
            'action' => $this->generateUrl('profile'),
            'method' => 'PUT',
        ));

        $form->add('submit', 'submit', array(
            'label' => 'Atualizar',
            'attr' => array(
                'class' => 'btn btn-primary'
            )));

        return $form;

    }
}
{'fraction_non_alphanumeric': 0.13469184890656064, 'fraction_numerical': 0.0, 'mean_word_length': 2.6868131868131866, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2274723', 'n_tokens_mistral': 570, 'n_tokens_neox': 554, 'n_words': 99}