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