1 | <?php |
||
5 | class RepeatIterator extends TraversableIterator implements \Countable |
||
6 | { |
||
7 | protected $count; |
||
8 | protected $currentIteration = 0; |
||
9 | protected $innerCount; |
||
10 | |||
11 | 7 | public function __construct(\Traversable $iterator, int $count) |
|
20 | |||
21 | 2 | public function count() |
|
28 | |||
29 | 1 | public function getIterationCount() |
|
33 | |||
34 | 1 | public function getCurrentIteration() |
|
38 | |||
39 | 5 | public function rewind() |
|
44 | |||
45 | 3 | public function next() |
|
53 | |||
54 | 3 | public function valid() |
|
58 | } |
||
59 |
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.