GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( d79ade...faea90 )
by Odiseo
02:53
created

ArticleCategoryRepository::findEnabled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Odiseo\BlogBundle\Doctrine\ORM;
4
5
use Doctrine\Common\Collections\Collection;
6
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository;
7
8
/**
9
 * @author Diego D'amico <[email protected]>
10
 */
11
class ArticleCategoryRepository extends EntityRepository implements ArticleCategoryRepositoryInterface
12
{
13
    /**
14
     * @inheritdoc
15
     */
16
    public function findEnabled(): Collection
17
    {
18
        return $this->createQueryBuilder('o')
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->createQuer...getQuery()->getResult() could return the type array which is incompatible with the type-hinted return Doctrine\Common\Collections\Collection. Consider adding an additional type-check to rule them out.
Loading history...
19
            ->addSelect('translation')
20
            ->innerJoin('o.translations', 'translation')
21
            ->andWhere('o.enabled = :enabled')
22
            ->setParameter('enabled', true)
23
            ->getQuery()
24
            ->getResult()
25
        ;
26
    }
27
}
28