Conditions | 5 |
Paths | 6 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 5 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | 752 | public function determineCarry(int $digit, int $nextDigit): int |
|
15 | { |
||
16 | 752 | $early = static::nonHalfEarlyReturn($digit); |
|
17 | 752 | $remainder = $this->remainderCheck(); |
|
18 | |||
19 | 752 | if ($early == 0) { |
|
20 | 428 | return ($nextDigit % 2 == 0 && !$remainder) ? 0 : 1; |
|
21 | } else { |
||
22 | 713 | return $early == 1 ? 1 : 0; |
|
23 | } |
||
25 | } |