Conditions | 4 |
Paths | 5 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
48 | public function valid() |
||
49 | { |
||
50 | while($this->innerIterationCount < $this->offset) { |
||
51 | if(!parent::valid()) { |
||
52 | return false; |
||
53 | } |
||
54 | $this->innerIterationCount += 1; |
||
55 | parent::next(); |
||
|
|||
56 | } |
||
57 | if($this->innerIterationCount >= $this->offset + $this->length) { |
||
58 | return false; |
||
59 | } |
||
60 | return parent::valid(); |
||
61 | } |
||
62 | |||
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.