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 | namespace MediaWiki\Extension\Notifications\Iterator; |
4 | |
5 | use IteratorDecorator; |
6 | use RecursiveIterator; |
7 | |
8 | /** |
9 | * Wraps a non-recursive iterator with methods to be recursive |
10 | * without children. |
11 | * |
12 | * Alternatively wraps a recursive iterator to prevent recursing deeper |
13 | * than the wrapped iterator. |
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 Never called |
22 | return null; |
23 | } |
24 | } |