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