| Conditions | 5 |
| Paths | 5 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 55 | 24 | public function valid() |
|
| 56 | { |
||
| 57 | 24 | while ($this->index < $this->start) { |
|
| 58 | 9 | if (parent::valid()) { |
|
| 59 | 9 | $this->index += 1; |
|
| 60 | 9 | parent::next(); |
|
|
|
|||
| 61 | } else { |
||
| 62 | 1 | return false; |
|
| 63 | } |
||
| 64 | } |
||
| 65 | |||
| 66 | 23 | if (null === $this->end || $this->index < $this->end) { |
|
| 67 | 20 | return parent::valid(); |
|
| 68 | } |
||
| 69 | |||
| 70 | 13 | return false; |
|
| 71 | } |
||
| 72 | |||
| 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 theSoncalls the wrong method in the parent class.