Failed Conditions
Push — master ( 77e3e5...46b695 )
by Michael
26s queued 19s
created

Doctrine/ORM/Query/Exec/SingleSelectExecutor.php (1 issue)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ORM\Query\Exec;
6
7
use Doctrine\DBAL\Connection;
8
use Doctrine\ORM\Query\AST\SelectStatement;
9
use Doctrine\ORM\Query\SqlWalker;
10
11
/**
12
 * Executor that executes the SQL statement for simple DQL SELECT statements.
13
 */
14
class SingleSelectExecutor extends AbstractSqlExecutor
15
{
16 643
    public function __construct(SelectStatement $AST, SqlWalker $sqlWalker)
17
    {
18 643
        $this->sqlStatements = $sqlWalker->walkSelectStatement($AST);
19 635
    }
20
21
    /**
22
     * {@inheritDoc}
23
     */
24 433
    public function execute(Connection $conn, array $params, array $types)
25
    {
26 433
        return $conn->executeQuery($this->sqlStatements, $params, $types, $this->queryCacheProfile);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $conn->executeQue...his->queryCacheProfile) also could return the type Doctrine\DBAL\Driver\ResultStatement which includes types incompatible with the return type mandated by Doctrine\ORM\Query\Exec\...tSqlExecutor::execute() of Doctrine\DBAL\Driver\Statement. Consider adding a type-check to rule them out.
Loading history...
27
    }
28
}
29