| Conditions | 5 |
| Paths | 5 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 5.583 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 1 | public function determineCarry(int $digit, int $nextDigit): int |
|
| 18 | { |
||
| 19 | 1 | $early = static::nonHalfEarlyReturn($digit); |
|
| 20 | 1 | $remainder = $this->remainderCheck(); |
|
| 21 | |||
| 22 | 1 | if ($early == 0 && !$remainder) { |
|
| 23 | 1 | return RandomProvider::randomInt(0, 1, RandomMode::Speed)->asInt(); |
|
| 24 | } else { |
||
| 25 | return (($early == 1 || $remainder) ? 1 : 0); |
||
| 26 | } |
||
| 28 | } |