| Conditions | 4 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | 4 | protected function countItems(): int |
|
| 49 | { |
||
| 50 | 4 | if ($this->config->items) { |
|
| 51 | 1 | return $this->config->items; |
|
| 52 | 3 | } elseif ($this->config->pages) { |
|
| 53 | 1 | return $this->config->pages * $this->config->perPage; |
|
| 54 | } |
||
| 55 | |||
| 56 | 2 | $pages = $this->config->firstPage == 0 ? $this->config->lastPage + 1 : $this->config->lastPage; |
|
| 57 | |||
| 58 | 2 | return $pages * $this->config->perPage; |
|
| 59 | } |
||
| 61 |