| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | abstract class ArrayNode extends AbstractNode implements IteratorAggregate, Countable |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * Gets the iterator. |
||
| 27 | */ |
||
| 28 | 3 | public function getIterator(): ArrayIterator |
|
| 29 | { |
||
| 30 | 3 | return new ArrayIterator($this->getIteratorArray()); |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Returns the count of the iterator array. |
||
| 35 | */ |
||
| 36 | 3 | public function count(): int |
|
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Returns the array to be used the the iterator. |
||
| 43 | */ |
||
| 44 | abstract protected function getIteratorArray(): array; |
||
| 45 | } |
||
| 46 |