1 | <?php |
||
11 | class SliceIterator extends \IteratorIterator implements FiniteIterableInterface |
||
12 | { |
||
13 | use FiniteIterableTrait; |
||
14 | |||
15 | /** @var int */ |
||
16 | private $index; |
||
17 | |||
18 | /** @var int */ |
||
19 | private $start; |
||
20 | |||
21 | /** @var null|int */ |
||
22 | private $end; |
||
23 | |||
24 | /** |
||
25 | * @param \Iterator $iterable |
||
26 | * @param int $start |
||
27 | * @param null|int $end |
||
28 | */ |
||
29 | 25 | public function __construct(\Iterator $iterable, $start, $end = null) |
|
43 | |||
44 | /** |
||
45 | * {@inheritDoc} |
||
46 | */ |
||
47 | 24 | public function valid() |
|
64 | |||
65 | /** |
||
66 | * {@inheritDoc} |
||
67 | */ |
||
68 | 19 | public function next() |
|
73 | |||
74 | /** |
||
75 | * {@inheritDoc} |
||
76 | */ |
||
77 | 24 | public function rewind() |
|
82 | } |
||
83 |
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.