| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public static function validate($grai) |
||
| 20 | { |
||
| 21 | $grai = self::unDecorate($grai); |
||
| 22 | if (strlen($grai) < 13 || strlen($grai) >= 30) { |
||
| 23 | return false; |
||
| 24 | } |
||
| 25 | $gtin13 = substr($grai, 0, 13); |
||
| 26 | |||
| 27 | return parent::check($gtin13, 13); // optional serial component not to be checked |
||
|
|
|||
| 28 | } |
||
| 29 | } |
||
| 30 |
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.