| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | abstract class ArrayNode extends AbstractNode implements IteratorAggregate, Countable |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Gets the iterator. |
||
| 19 | */ |
||
| 20 | 3 | public function getIterator(): ArrayIterator |
|
| 21 | { |
||
| 22 | 3 | return new ArrayIterator($this->getIteratorArray()); |
|
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Returns the count of the iterator array. |
||
| 27 | */ |
||
| 28 | 3 | public function count(): int |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Returns the array to be used the the iterator. |
||
| 35 | */ |
||
| 36 | abstract protected function getIteratorArray(): array; |
||
| 37 | } |
||
| 38 |