mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-21 04:03:40 +00:00
43d004fc3d
Seen when running phpunit tests. Bug: T289879 Change-Id: I6f05b2cf21cd7c51b6d3234e6e0356c8a563202a
20 lines
502 B
PHP
20 lines
502 B
PHP
<?php
|
|
|
|
/**
|
|
* Wraps a non-recursive iterator with methods to be recursive
|
|
* without children.
|
|
*
|
|
* Alternatively wraps a recursive iterator to prevent recursing deeper
|
|
* than the wrapped iterator.
|
|
*/
|
|
class EchoNotRecursiveIterator extends IteratorDecorator implements RecursiveIterator {
|
|
public function hasChildren(): bool {
|
|
return false;
|
|
}
|
|
|
|
public function getChildren(): ?RecursiveIterator {
|
|
// @phan-suppress-next-line PhanTypeMismatchReturnProbablyReal Never called
|
|
return null;
|
|
}
|
|
}
|