| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 3 | public function shouldNotifyChange(Status $currentStatus, Status $newStatus): bool |
|
| 35 | { |
||
| 36 | 3 | $hits = $this->hits(); |
|
| 37 | 3 | if (0 === $hits) { |
|
| 38 | 1 | return false; |
|
| 39 | } |
||
| 40 | 3 | $current = floor($currentStatus->getValue() / $hits); |
|
| 41 | 3 | $new = floor($newStatus->getValue() / $hits); |
|
| 42 | 3 | return ($current !== $new); |
|
| 43 | } |
||
| 51 |