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