<commit_before><?php

namespace AppBundle\Repository;

use AppBundle\Entity\Promotion;
use AppBundle\Entity\Season;
use Doctrine\ORM\EntityRepository;

class PromotionRepository extends EntityRepository
{
    /**
     * @param Season $season
     * @return Promotion[]
     */
    public function findBySeason(Season $season): array
    {
        return $this
            ->createQueryBuilder('promotion')
            ->innerJoin('promotion.member', 'm')
            ->innerJoin('promotion.rank', 'rank')
            ->addSelect('m')
            ->addSelect('rank')
            ->andWhere('promotion.date BETWEEN :start AND :stop')
            ->setParameter(':start', $season->getStart())
            ->setParameter(':stop', $season->getStop())
            ->getQuery()
            ->getResult();
    }
}<commit_msg>Add last promotions<commit_after><?php

namespace AppBundle\Repository;

use AppBundle\Entity\Promotion;
use AppBundle\Entity\Season;
use Doctrine\ORM\EntityRepository;

class PromotionRepository extends EntityRepository
{
    /**
     * @param Season $season
     * @return Promotion[]
     */
    public function findBySeason(Season $season): array
    {
        return $this
            ->createQueryBuilder('promotion')
            ->innerJoin('promotion.member', 'm')
            ->innerJoin('promotion.rank', 'rank')
            ->addSelect('m')
            ->addSelect('rank')
            ->andWhere('promotion.date BETWEEN :start AND :stop')
            ->addOrderBy('promotion.date', 'DESC')
            ->addOrderBy('m.firstname', 'ASC')
            ->addOrderBy('m.lastname', 'ASC')
            ->setParameter(':start', $season->getStart())
            ->setParameter(':stop', $season->getStop())
            ->getQuery()
            ->getResult();
    }
}
{'fraction_non_alphanumeric': 0.15022421524663676, 'fraction_numerical': 0.0, 'mean_word_length': 2.413001912045889, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 30, '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': '6533686', 'n_tokens_mistral': 499, 'n_tokens_neox': 490, 'n_words': 94}