| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class StatusCheckPager implements AdapterInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var Iterator |
||
| 14 | */ |
||
| 15 | private $iterator; |
||
| 16 | |||
| 17 | public function __construct(Iterator $iterator) |
||
| 18 | { |
||
| 19 | $this->iterator = $iterator; |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @return int |
||
| 24 | */ |
||
| 25 | public function getNbResults() |
||
| 26 | { |
||
| 27 | $count = 0; |
||
| 28 | for ($this->iterator->rewind(); $this->iterator->valid(); $this->iterator->next()) { |
||
| 29 | $count++; |
||
| 30 | } |
||
| 31 | return $count; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getSlice($offset, $length) |
||
| 37 | } |
||
| 38 | } |
||
| 39 |