1 | <?php |
||
17 | class SliceIterator extends \IteratorIterator implements FiniteIterableInterface |
||
18 | { |
||
19 | use FiniteIterableTrait; |
||
20 | |||
21 | /** @var integer */ |
||
22 | private $index; |
||
23 | |||
24 | /** @var integer */ |
||
25 | private $start; |
||
26 | |||
27 | /** @var null|int */ |
||
28 | private $end; |
||
29 | |||
30 | /** |
||
31 | * SliceIterator constructor. |
||
32 | * |
||
33 | * @param \Iterator $iterable |
||
34 | * @param integer $start |
||
35 | * @param null|integer $end |
||
36 | */ |
||
37 | 25 | public function __construct(\Iterator $iterable, $start, $end = null) |
|
51 | |||
52 | /** |
||
53 | * @{inheritDoc} |
||
54 | */ |
||
55 | 24 | public function valid() |
|
72 | |||
73 | /** |
||
74 | * @{inheritDoc} |
||
75 | */ |
||
76 | 19 | public function next() |
|
81 | |||
82 | /** |
||
83 | * @{inheritDoc} |
||
84 | */ |
||
85 | 24 | public function rewind() |
|
90 | } |
||
91 |
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.