1 | <?php |
||
11 | class CollapseIterator extends \IteratorIterator implements FiniteIterableInterface |
||
12 | { |
||
13 | use FiniteIterableTrait; |
||
14 | |||
15 | /** |
||
16 | * @param \Iterator $iterable |
||
17 | */ |
||
18 | public function __construct(\Iterator $iterable) |
||
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | public function key() |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function current() |
||
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.