Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| NotRecursiveIterator | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| hasChildren | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getChildren | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * @license GPL-2.0-or-later |
| 4 | */ |
| 5 | |
| 6 | /** |
| 7 | * Wraps a non-recursive iterator with methods to be recursive |
| 8 | * without children. |
| 9 | * |
| 10 | * Alternatively wraps a recursive iterator to prevent recursing deeper |
| 11 | * than the wrapped iterator. |
| 12 | * |
| 13 | * @ingroup Maintenance |
| 14 | */ |
| 15 | class NotRecursiveIterator extends IteratorDecorator implements RecursiveIterator { |
| 16 | public function hasChildren(): bool { |
| 17 | return false; |
| 18 | } |
| 19 | |
| 20 | public function getChildren(): ?RecursiveIterator { |
| 21 | // @phan-suppress-next-line PhanTypeMismatchReturnProbablyReal False positive |
| 22 | return null; |
| 23 | } |
| 24 | } |