<commit_before><?php

namespace VB\WebBundle\Controller;

use Doctrine\ORM\EntityManager;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

class HomepageController extends Controller
{
    /**
     * @return \Symfony\Component\HttpFoundation\Response
     * @Route("/", name="homepage")
     * @Template()
     */
    public function indexAction()
    {
        /**
         * @var $em EntityManager
         */
        $em = $this->getDoctrine()->getManager();

        $products = null;
        $qb = $em->createQueryBuilder();
        $qb->select('p')
            ->from('VBCommerceBundle:Product','p')
            ->join('p.categories','c')
            ->leftJoin('p.images','i')
            ->orderBy('p.id','desc');
        $qb->setMaxResults(9);

        return array('products' => $qb->getQuery()->getResult());
    }
}<commit_msg>Max results homepage<commit_after><?php

namespace VB\WebBundle\Controller;

use Doctrine\ORM\EntityManager;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

class HomepageController extends Controller
{
    /**
     * @return \Symfony\Component\HttpFoundation\Response
     * @Route("/", name="homepage")
     * @Template()
     */
    public function indexAction()
    {
        /**
         * @var $em EntityManager
         */
        $em = $this->getDoctrine()->getManager();

        $products = null;
        $qb = $em->createQueryBuilder();
        $qb->select('p')
            ->from('VBCommerceBundle:Product','p')
            ->join('p.categories','c')
            ->leftJoin('p.images','i')
            ->orderBy('p.id','desc');
        $qb->setMaxResults(8);

        return array('products' => $qb->getQuery()->getResult());
    }
}
{'fraction_non_alphanumeric': 0.1629933367503844, 'fraction_numerical': 0.0010251153254741158, 'mean_word_length': 2.7610789980732178, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '6031759', 'n_tokens_mistral': 568, 'n_tokens_neox': 561, 'n_words': 84}