mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-11 15:38:37 +00:00
0f0c6c4fa6
Change-Id: I87fa703da9e7725370d72c58fc40eb204a309e67
25 lines
600 B
PHP
25 lines
600 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\Notifications\Iterator;
|
|
|
|
use IteratorDecorator;
|
|
use RecursiveIterator;
|
|
|
|
/**
|
|
* 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 NotRecursiveIterator extends IteratorDecorator implements RecursiveIterator {
|
|
public function hasChildren(): bool {
|
|
return false;
|
|
}
|
|
|
|
public function getChildren(): ?RecursiveIterator {
|
|
// @phan-suppress-next-line PhanTypeMismatchReturnProbablyReal Never called
|
|
return null;
|
|
}
|
|
}
|