| Conditions | 3 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | 1 | #[\Override] |
|
| 20 | public function handleSpacecraftTick( |
||
| 21 | SpacecraftWrapperInterface $wrapper, |
||
| 22 | InformationInterface $information |
||
| 23 | ): void { |
||
| 24 | |||
| 25 | 1 | $spacecraft = $wrapper->get(); |
|
| 26 | |||
| 27 | // leave spacecraft |
||
| 28 | if ( |
||
| 29 | 1 | $this->crewAssignmentRepository->getAmountBySpacecraft($spacecraft) > 0 |
|
| 30 | 1 | && !$spacecraft->isSystemHealthy(SpacecraftSystemTypeEnum::LIFE_SUPPORT) |
|
| 31 | ) { |
||
| 32 | 1 | $information->addInformation('Die Lebenserhaltung ist ausgefallen:'); |
|
| 33 | 1 | $information->addInformation($this->spacecraftLeaver->evacuate($wrapper)); |
|
| 34 | |||
| 35 | 1 | throw new SpacecraftTickFinishedException(); |
|
| 36 | } |
||
| 39 |