| Total Complexity | 5 |
| Total Lines | 74 |
| Duplicated Lines | 0 % |
| Changes | 4 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 14 | class DoctrineQueryPager implements Pageable |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var QueryBuilder |
||
| 18 | */ |
||
| 19 | protected $qb; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $alias; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $countAlias; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var null |
||
| 33 | */ |
||
| 34 | protected $countQuery; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Constructor. |
||
| 38 | * |
||
| 39 | * @param \Doctrine\ORM\QueryBuilder $q |
||
| 40 | * @param string $alias |
||
| 41 | * @param string $countAlias |
||
| 42 | */ |
||
| 43 | public function __construct(QueryBuilder $q, $alias = 'f', $countAlias = '__count') |
||
| 49 | } |
||
| 50 | |||
| 51 | |||
| 52 | /** |
||
| 53 | * Set the count query to override the default generated count query. |
||
| 54 | * |
||
| 55 | * @param \Doctrine\ORM\Query $countQuery |
||
| 56 | * @return void |
||
| 57 | */ |
||
| 58 | public function setCountQuery($countQuery) |
||
| 59 | { |
||
| 60 | $this->countQuery = $countQuery; |
||
|
|
|||
| 61 | } |
||
| 62 | |||
| 63 | |||
| 64 | /** |
||
| 65 | * Returns the absolute total of the pageable set of elements. |
||
| 66 | * |
||
| 67 | * @return int |
||
| 68 | */ |
||
| 69 | public function getTotal() |
||
| 76 | } |
||
| 77 | |||
| 78 | /** |
||
| 79 | * Sets the range that needs to be displayed on the current page |
||
| 80 | * |
||
| 81 | * @param int $start |
||
| 82 | * @param int $length |
||
| 83 | * @return int |
||
| 84 | */ |
||
| 85 | public function setRange($start, $length) |
||
| 88 | } |
||
| 89 | } |
||
| 90 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..