<commit_before><?php

namespace AppBundle\Repository;

use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\ORM\EntityRepository;

/**
 * LinkRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class LinkRepository extends EntityRepository
{
    public function getAllLinksByUserId($id)
    {
        /**
         * @var $qb QueryBuilder
         */
        $qb = $this->getEntityManager()->createQueryBuilder();
        $q = $qb->select('l.id, l.url, l.code')
            ->from('AppBundle:Link', 'l')
            ->where('l.user_id = ?1')
            ->setParameter(1, $id)
            ->getQuery();

        return $q->execute();
    }

    public function getLink(string $code)
    {
        /**
         * @var $qb QueryBuilder
         */
        $qb = $this->getEntityManager()->createQueryBuilder();
<commit_msg>Fixed issue causing getAllLinksByUserId to return a fatal error<commit_after><?php

namespace AppBundle\Repository;

use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\ORM\EntityRepository;

/**
 * LinkRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class LinkRepository extends EntityRepository
{
    public function getAllLinksByUserId($id)
    {
        /**
         * @var $qb QueryBuilder
         */
        $qb = $this->getEntityManager()->createQueryBuilder();
        $q = $qb->select('l.id, l.url, l.code')
            ->from('AppBundle:Link', 'l')
            ->where('l.user = ?1')
            ->setParameter(1, $id)
            ->getQuery();

        return $q->execute();
    }

    public function getLink(string $code)
    {
        /**
         * @var $qb QueryBuilder
         */
        $qb = $this->getEntityManager()->createQueryBuilder();

{'fraction_non_alphanumeric': 0.13804527885146328, 'fraction_numerical': 0.0022087244616234127, 'mean_word_length': 2.3370165745856353, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '6636200', 'n_tokens_mistral': 531, 'n_tokens_neox': 531, 'n_words': 122}