<commit_before><?php

namespace CanalTP\MttBundle\Entity;

use Doctrine\ORM\EntityRepository;

/**
 * StopPointRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class StopPointRepository extends EntityRepository
{
    public function getBlocks($stopPoint, $timetable)
    {
        $result = $this->getEntityManager()->getRepository('CanalTPMttBundle:Block')->findBy(
            array(
                'stopPoint' => $stopPoint->getId(),
                'timetable' => $timetable->getId()
            )
        );

        return $result;
    }

    public function updatePdfGenerationInfos($externalStopPointId, $timetable, $hash)
    {
        $stopPoint = $this->getStopPoint($externalStopPointId, $timetable);

        $stopPoint->setPdfGenerationDate(new \DateTime());
        $stopPoint->setPdfHash($hash);
        $this->getEntityManager()->persist($stopPoint);
        $this->getEntityManager()->flush();
    }

    public function getStopPoint($externalStopPointId, $timetable)<commit_msg>FIX about pdf generation on click.<commit_after><?php

namespace CanalTP\MttBundle\Entity;

use Doctrine\ORM\EntityRepository;

/**
 * StopPointRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class StopPointRepository extends EntityRepository
{
    public function getBlocks($stopPoint, $timetable)
    {
        $result = $this->getEntityManager()->getRepository('CanalTPMttBundle:Block')->findBy(
            array(
                'stopPoint' => $stopPoint->getId(),
                'timetable' => $timetable->getId()
            )
        );

        return $result;
    }

    public function updatePdfGenerationInfos($externalStopPointId, $timetable, $hash)
    {
        $stopPoint = $this->getStopPoint($externalStopPointId, $timetable);

        $stopPoint->setPdfGenerationDate(new \DateTime());
        $stopPoint->setPdfHash($hash);
        $this->getEntityManager()->flush($stopPoint);
    }

    public function getStopPoint($externalStopPointId, $timetable)
{'fraction_non_alphanumeric': 0.12304038004750593, 'fraction_numerical': 0.0, 'mean_word_length': 3.212, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '6486516', 'n_tokens_mistral': 596, 'n_tokens_neox': 576, 'n_words': 113}