1 | <?php |
||
24 | class Pager extends BasePager |
||
25 | { |
||
26 | /** |
||
27 | * NEXT_MAJOR: remove this property. |
||
28 | * |
||
29 | * @deprecated This property is deprecated since version 2.4 and will be removed in 3.0 |
||
30 | */ |
||
31 | protected $queryBuilder = null; |
||
32 | |||
33 | public function computeNbResult() |
||
34 | { |
||
35 | $countQuery = $this->getClonedQuery()->getQuery(); |
||
36 | |||
37 | $platform = $countQuery->getEntityManager()->getConnection()->getDatabasePlatform(); |
||
38 | $rsm = new Query\ResultSetMapping(); |
||
39 | $rsm->addScalarResult($platform->getSQLResultCasing('dctrn_count'), 'count'); |
||
40 | $countQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, CountOutputWalker::class); |
||
41 | $countQuery->setResultSetMapping($rsm); |
||
42 | |||
43 | $countQuery->setFirstResult(null)->setMaxResults(null); |
||
44 | |||
45 | return $countQuery->getSingleScalarResult(); |
||
46 | } |
||
47 | |||
48 | public function getResults($hydrationMode = Query::HYDRATE_OBJECT) |
||
49 | { |
||
50 | return $this->getQuery()->execute([], $hydrationMode); |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @return ProxyQueryInterface |
||
55 | */ |
||
56 | public function getQuery() |
||
60 | |||
61 | public function init() |
||
85 | |||
86 | /** |
||
87 | * @return ProxyQueryInterface |
||
88 | */ |
||
89 | private function getClonedQuery() |
||
100 | } |
||
101 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.