1 | <?php |
||
5 | class InfiniteIterator extends IteratorIterator |
||
6 | { |
||
7 | private $endCondition; |
||
8 | private $currentIteration; |
||
9 | |||
10 | 5 | public function __construct(\Traversable $iterator, callable $endCondition = null) |
|
15 | |||
16 | 1 | public function getCurrentIteration() |
|
20 | |||
21 | 5 | public function rewind() |
|
26 | |||
27 | 5 | public function valid() |
|
36 | |||
37 | } |
||
38 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.