Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
42 | 12 | public function calculateDigit($baseNumber) |
|
43 | { |
||
44 | 12 | $calculator = new DigitCalculator($baseNumber); |
|
45 | 12 | $calculator->withMultipliersInterval(2, 9); |
|
46 | 12 | $calculator->useComplementaryInsteadOfModule(); |
|
47 | 12 | $calculator->replaceWhen('0', 10, 11); |
|
48 | 12 | $calculator->withModule(DigitCalculator::MODULE_11); |
|
49 | 12 | $digit = $calculator->calculate(); |
|
50 | |||
51 | 12 | return "{$digit}"; |
|
52 | } |
||
53 | } |
||
54 |
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.