Issues (40)

tests/Doctrine/ORMQueryResultTest.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
class ORMQueryResultTest extends ORMResultTest
10
{
11
    protected function createResultWithItems(int $count): Result
12
    {
13
        $this->persistEntities($count);
14
15
        $query = $this->em->createQuery(\sprintf('SELECT e FROM %s e', ORMEntity::class));
0 ignored issues
show
The method createQuery() 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

15
        /** @scrutinizer ignore-call */ 
16
        $query = $this->em->createQuery(\sprintf('SELECT e FROM %s e', ORMEntity::class));

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...
16
17
        return new ORMQueryResult($query);
18
    }
19
}
20