<commit_before><?php

namespace matuck\LibraryBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use matuck\LibraryBundle\Entity\Download;
use Symfony\Component\HttpFoundation\Response;
use Pagerfanta\Pagerfanta;
use matuck\LibraryBundle\Entity\Book;
use matuck\LibraryBundle\Entity\Author;
use matuck\LibraryBundle\Entity\Serie;
use matuck\LibraryBundle\Entity\Tag;
use Symfony\Component\Yaml\Yaml;

class PagesController extends Controller
{
    public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();
        $bookrepo = $em->getRepository('matuckLibraryBundle:Book');
        /* @var $bookrepo \matuck\LibraryBundle\Entity\BookRepository */
        $pager = $bookrepo->newestbooks();
        /* @var $pager Pagerfanta */
        $pager->setMaxPerPage(8);
        $newbooks = $pager->getCurrentPageResults();
        $topratedbooks = $bookrepo->findAllPagerOrderbyRating()->setMaxPerPage(5)->getCurrentPageResults();
        $popularbooks = $bookrepo->popularbooks()->setMaxPerPage(10)->getCurrentPageResults();
        $popularauthors = $em->getRepository('matuckLibraryBundle:Author')->findAllPagedOrderbyVotes()->setMaxPerPage(10)->getCurrentPageResults();
        $downloadcount = $em->getRepository('matuckLibraryBundle:Dailydownloads')->getTotalDownloadCount()[0];
        $ratingcount = $em->getRepository('matuckLibraryBundle:Rating')->totalratingcount();
        $authorcount = $em->getRepository('matuckLibraryBundle:Author')->totalauthorcount();
        $populartags = $em->getRepository('matuckLibraryBundle:Tag')->populartags()->setMaxPerPage(20)->getCurrentPageResults();
        //$populartags = $em->getRepository('matuckLibraryBundle:Tag')->populartags()->getQuery()->getMaxResults();
        $featured = $em->getRepository('matuckLibraryBundle:Featured')->PagerOrderbyUpdated()->setMaxPerPage(5)->getCurrentPageResults();
        $bookcount = $bookrepo->totalbookcount();
        $books = $this->container->getParameter('matuck_library_featured');
        $response = $this->render('matuckLibraryBundle:Pages:index.html.twig', array(
            'newbooks' => $newbooks,
            'topratedbooks' => $topratedbooks,
            'popularbooks' => $popularbooks,<commit_msg>fix for old featured way.  removing matuck_library_featured call for parameter.<commit_after><?php

namespace matuck\LibraryBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use matuck\LibraryBundle\Entity\Download;
use Symfony\Component\HttpFoundation\Response;
use Pagerfanta\Pagerfanta;
use matuck\LibraryBundle\Entity\Book;
use matuck\LibraryBundle\Entity\Author;
use matuck\LibraryBundle\Entity\Serie;
use matuck\LibraryBundle\Entity\Tag;
use Symfony\Component\Yaml\Yaml;

class PagesController extends Controller
{
    public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();
        $bookrepo = $em->getRepository('matuckLibraryBundle:Book');
        /* @var $bookrepo \matuck\LibraryBundle\Entity\BookRepository */
        $pager = $bookrepo->newestbooks();
        /* @var $pager Pagerfanta */
        $pager->setMaxPerPage(8);
        $newbooks = $pager->getCurrentPageResults();
        $topratedbooks = $bookrepo->findAllPagerOrderbyRating()->setMaxPerPage(5)->getCurrentPageResults();
        $popularbooks = $bookrepo->popularbooks()->setMaxPerPage(10)->getCurrentPageResults();
        $popularauthors = $em->getRepository('matuckLibraryBundle:Author')->findAllPagedOrderbyVotes()->setMaxPerPage(10)->getCurrentPageResults();
        $downloadcount = $em->getRepository('matuckLibraryBundle:Dailydownloads')->getTotalDownloadCount()[0];
        $ratingcount = $em->getRepository('matuckLibraryBundle:Rating')->totalratingcount();
        $authorcount = $em->getRepository('matuckLibraryBundle:Author')->totalauthorcount();
        $populartags = $em->getRepository('matuckLibraryBundle:Tag')->populartags()->setMaxPerPage(20)->getCurrentPageResults();
        //$populartags = $em->getRepository('matuckLibraryBundle:Tag')->populartags()->getQuery()->getMaxResults();
        $featured = $em->getRepository('matuckLibraryBundle:Featured')->PagerOrderbyUpdated()->setMaxPerPage(5)->getCurrentPageResults();
        $bookcount = $bookrepo->totalbookcount();
        $response = $this->render('matuckLibraryBundle:Pages:index.html.twig', array(
            'newbooks' => $newbooks,
            'topratedbooks' => $topratedbooks,
            'popularbooks' => $popularbooks,
{'fraction_non_alphanumeric': 0.14597240765465064, 'fraction_numerical': 0.004450378282153983, 'mean_word_length': 4.993333333333333, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5008579', 'n_tokens_mistral': 1285, 'n_tokens_neox': 1273, 'n_words': 154}