| Total Complexity | 5 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 58.33% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Cycle extends Iterators |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * {@inheritdoc} |
||
| 15 | */ |
||
| 16 | 3 | public function count() |
|
| 17 | { |
||
| 18 | 3 | return count($this->getDataset()); |
|
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | */ |
||
| 24 | 3 | public function current() |
|
| 25 | { |
||
| 26 | 3 | return $this->dataset[$this->key]; |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * {@inheritdoc} |
||
| 31 | * |
||
| 32 | * @return void |
||
| 33 | */ |
||
| 34 | 3 | public function next() |
|
| 35 | { |
||
| 36 | 3 | $this->key = ($this->key + 1) % $this->datasetCount; |
|
| 37 | 3 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | public function rewind() |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | * |
||
| 50 | * @return bool |
||
| 51 | */ |
||
| 52 | public function valid() |
||
| 55 | } |
||
| 56 | } |
||
| 57 |