Issues (40)

tests/Doctrine/ORMQueryBuilderResultTest.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Zenstruck\Porpaginas\Tests\Doctrine;
4
5
use Zenstruck\Porpaginas\Doctrine\ORMQueryResult;
6
use Zenstruck\Porpaginas\Result;
7
use Zenstruck\Porpaginas\Tests\Doctrine\Fixtures\ORMEntity;
8
9
/**
10
 * @author Kevin Bond <[email protected]>
11
 */
12
class ORMQueryBuilderResultTest extends ORMResultTest
13
{
14
    protected function createResultWithItems(int $count): Result
15
    {
16
        $this->persistEntities($count);
17
18
        $qb = $this->em->createQueryBuilder()
0 ignored issues
show
The method createQueryBuilder() does not exist on null. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
        $qb = $this->em->/** @scrutinizer ignore-call */ createQueryBuilder()

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
19
            ->select('e')
20
            ->from(ORMEntity::class, 'e')
21
        ;
22
23
        return new ORMQueryResult($qb);
24
    }
25
}
26