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 ( 939775...4bbee1 )
by Christian
04:22
created

EntityManagerTrait::createQueryBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) Christian Gripp <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Core23\DoctrineExtensions\Adapter\ORM;
13
14
use Doctrine\ORM\EntityManager;
15
use Doctrine\ORM\EntityRepository;
16
use Doctrine\ORM\QueryBuilder;
17
18
trait EntityManagerTrait
19
{
20
    /**
21
     * Creates a new QueryBuilder instance that is prepopulated for this entity name.
22
     *
23
     * @param string $alias
24
     * @param string $indexBy The index for the from
25
     *
26
     * @return QueryBuilder|EntityManager
27
     */
28
    final protected function createQueryBuilder(string $alias, string $indexBy = null)
29
    {
30
        return $this->getRepository()
31
            ->createQueryBuilder($alias, $indexBy);
32
    }
33
34
    /**
35
     * Returns the related Object Repository.
36
     *
37
     * @return EntityRepository
38
     */
39
    abstract protected function getRepository();
40
}
41