During phpstan analysis of the code find out the notice:
Return type mixed of method Rule::getIterator() is not covariant with tentative return type Traversable of method IteratorAggregate::getIterator().
Suggest to estimate 'Traversable' type of return value for this function.
Closed: won't fix
2.0
Rules Core