1 | <?php |
||
5 | class IndexIterator extends TraversableIterator implements \Countable |
||
6 | { |
||
7 | private $indexingIterator; |
||
8 | private $valid; |
||
9 | |||
10 | 3 | public function __construct(\Traversable $iterator, iterable $indexes) |
|
21 | 3 | ||
22 | public function count() |
||
26 | 3 | ||
27 | 3 | public function rewind() |
|
33 | 3 | ||
34 | public function next() |
||
43 | |||
44 | public function valid() |
||
48 | } |
||
49 |
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.