1 | <?php |
||
13 | class SliceIterator extends IteratorIterator |
||
14 | { |
||
15 | const PRESERVE_KEYS = true; |
||
16 | const DONT_PRESERVE_KEYS = false; |
||
17 | |||
18 | protected $offset; |
||
19 | protected $length; |
||
20 | protected $preserveKeys; |
||
21 | protected $innerIterationCount; |
||
22 | protected $outerIterationCount; |
||
23 | |||
24 | public function __construct($iterable, $offset, $length = INF, $preserveKeys = false) |
||
31 | |||
32 | public function key() |
||
40 | |||
41 | public function next() |
||
47 | |||
48 | public function valid() |
||
62 | |||
63 | public function rewind() |
||
69 | } |
||
70 | |||
71 |
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.