Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 9 | public function getMaxShield(bool $isTheoretical = false): int |
|
16 | { |
||
17 | 9 | if ($isTheoretical || !$this->hasSpacecraftSystem(SpacecraftSystemTypeEnum::SHIELDS)) { |
|
18 | 5 | return $this->max_schilde; |
|
19 | } |
||
20 | |||
21 | 7 | return (int) (ceil($this->max_schilde |
|
22 | 7 | * $this->getSpacecraftSystem(SpacecraftSystemTypeEnum::SHIELDS)->getStatus() / 100)); |
|
23 | } |
||
25 |