<commit_before><?php

namespace Nadeo\Live\ManiadogeBundle\Controller;

use Doctrine\Common\Persistence\ObjectRepository;
use Nadeo\Live\ManiadogeBundle\Entity\Doge;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

class DogeController extends Controller
{

    /**
     * @return ObjectRepository
     */
    protected function getDogeRepo()
    {
        return $this->container->get('doctrine.orm.entity_manager')->getRepository(Doge::class);
    }

    function indexAction()
    {
        $doges = $this->getDogeRepo()->findAll();
        return $this->render('ManiadogeBundle:Doge:index.xml.php', ['doges' => $doges], new Response('', 200, ['Content-Type' => 'application/xml']));
    }

    function dogeAction($id)
    {
        $doge = $this->getDogeRepo()->find($id);
        if (!$doge) {
            throw new NotFoundHttpException('Wow no doge');
        }
        return $this->render('ManiadogeBundle:Doge:doge.xml.php', ['doge' => $doge],
                new Response('', 200, ['Content-Type' => 'application/xml']));
    }<commit_msg>Such ParamConverter !<commit_after><?php

namespace Nadeo\Live\ManiadogeBundle\Controller;

use Doctrine\Common\Persistence\ObjectRepository;
use Nadeo\Live\ManiadogeBundle\Entity\Doge;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;

class DogeController extends Controller
{

    /**
     * @return ObjectRepository
     */
    protected function getDogeRepo()
    {
        return $this->container->get('doctrine.orm.entity_manager')->getRepository(Doge::class);
    }

    function indexAction()
    {
        $doges = $this->getDogeRepo()->findAll();
        return $this->render('ManiadogeBundle:Doge:index.xml.php', ['doges' => $doges],
                new Response('', 200, ['Content-Type' => 'application/xml']));
    }

    /**
     * @ParamConverter("doge", class="ManiadogeBundle:Doge")
     */
    function dogeAction(Doge $doge)
    {
        return $this->render('ManiadogeBundle:Doge:doge.xml.php', ['doge' => $doge],
                new Response('', 200, ['Content-Type' => 'application/xml']));
    }
{'fraction_non_alphanumeric': 0.1493453355155483, 'fraction_numerical': 0.004909983633387889, 'mean_word_length': 3.7475728155339807, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2494722', 'n_tokens_mistral': 761, 'n_tokens_neox': 742, 'n_words': 114}