| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class KeylessAppendIterator extends \AppendIterator |
||
| 14 | { |
||
| 15 | /** @var int */ |
||
| 16 | private $key; |
||
| 17 | |||
| 18 | 5 | public function rewind() |
|
| 19 | { |
||
| 20 | 5 | $this->key = 0; |
|
| 21 | |||
| 22 | 5 | parent::rewind(); |
|
| 23 | 5 | } |
|
| 24 | |||
| 25 | 5 | public function next() |
|
| 26 | { |
||
| 27 | 5 | if ($this->valid()) { |
|
| 28 | 5 | parent::next(); |
|
| 29 | 5 | ++$this->key; |
|
| 30 | } |
||
| 31 | 5 | } |
|
| 32 | |||
| 33 | /** |
||
| 34 | * @return int |
||
| 35 | */ |
||
| 36 | 5 | public function key() |
|
| 39 | } |
||
| 40 | } |
||
| 41 |