1 | <?php |
||
17 | class ReversedIterator extends \IteratorIterator implements FiniteIterableInterface |
||
18 | { |
||
19 | use FiniteIterableTrait; |
||
20 | |||
21 | /** |
||
22 | * ReversedIterator constructor. |
||
23 | * |
||
24 | * @param \Iterator $iterable |
||
25 | */ |
||
26 | 4 | public function __construct(\Iterator $iterable) |
|
34 | |||
35 | /** |
||
36 | * @{inheritDoc} |
||
37 | */ |
||
38 | 2 | public function key() |
|
43 | |||
44 | /** |
||
45 | * @{inheritDoc} |
||
46 | */ |
||
47 | 2 | public function current() |
|
52 | } |
||
53 |
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.