<commit_before><?php

namespace Fabfoto\GalleryBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;

class UserController extends Controller
{
        /**
     * @Route("/{slug}/about", name="show_about")
     */
    public function showAboutAction($slug)
    {
        $author = $this->getUserBySlug($slug);
        if (!$author) {
            throw $this->createNotFoundException('Unable to find user');
        }

        return $this->render('FabfotoGalleryBundle:Default:ShowAbout.html.twig', array(
                    'author' => $author
                ));
    }

    /**
     * @Route("/{slug}", name="show_user")
     */
    public function showUserAction($slug)
    {
        $author = $this->getUserBySlug($slug);
        if (!$author) {
            throw $this->createNotFoundException('Unable to find user');
        }

        return $this->render('FabfotoGalleryBundle:User:ShowAbout.html.twig', array(
                    'author' => $author
                ));
    }
    /**
     * Function to retrieve user by slug name
     */
    protected function getUserBySlug($slug)
    {
        return $this
                ->getDoctrine()
                ->getRepository('FabfotoUserBundle:User')
                ->findOneBySlug($slug);<commit_msg>fix a router issue in production<commit_after><?php

namespace Fabfoto\GalleryBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;

class UserController extends Controller
{
    /**
     * @Route("/{slug}/about", name="show_about")
     */
    public function showAboutAction($slug)
    {
        $author = $this->getUserBySlug($slug);
        if (!$author) {
            throw $this->createNotFoundException('Unable to find user');
        }

        return $this->render('FabfotoGalleryBundle:Default:ShowAbout.html.twig', array(
                    'author' => $author
                ));
    }

    /**
     * @Route("/cv/{slug}", name="show_user")
     */
    public function showUserAction($slug)
    {
        $author = $this->getUserBySlug($slug);
        if (!$author) {
            throw $this->createNotFoundException('Unable to find user');
        }

        return $this->render('FabfotoGalleryBundle:User:ShowAbout.html.twig', array(
                    'author' => $author
                ));
    }
    /**
     * Function to retrieve user by slug name
     */
    protected function getUserBySlug($slug)
    {
        return $this
                ->getDoctrine()
                ->getRepository('FabfotoUserBundle:User')
                ->findOneBySlug($slug);
{'fraction_non_alphanumeric': 0.1334072431633407, 'fraction_numerical': 0.0, 'mean_word_length': 2.211150652431791, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '252576', 'n_tokens_mistral': 759, 'n_tokens_neox': 756, 'n_words': 132}