| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.032 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | 1 | public function getHitChance(): int |
|
| 16 | { |
||
| 17 | 1 | if (!$this->hasSpacecraftSystem(SpacecraftSystemTypeEnum::COMPUTER)) { |
|
| 18 | return $this->hit_chance; |
||
| 19 | } |
||
| 20 | |||
| 21 | 1 | return (int) (ceil($this->hit_chance |
|
| 22 | 1 | * $this->getSpacecraftSystem(SpacecraftSystemTypeEnum::COMPUTER)->getStatus() / 100)); |
|
| 23 | } |
||
| 25 |