| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 56 | protected function prepareTotalCount() |
||
| 57 | { |
||
| 58 | if (!$this->query instanceof QueryInterface) { |
||
| 59 | throw new InvalidConfigException('The "query" property must be an instance of a class that implements the QueryInterface e.g. yii\db\Query or its subclasses.'); |
||
| 60 | } |
||
| 61 | return (int) $this->query->limit($this->getPagination()->getLimit())->offset(-1)->orderBy([])->count('*', $this->db); |
||
| 62 | } |
||
| 63 | |||
| 65 |