| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | private function reloadWarpdrive(ShipWrapperInterface $wrapper, int $minimalPercentage): void |
||
| 31 | { |
||
| 32 | $warpdrive = $wrapper->getWarpDriveSystemData(); |
||
| 33 | |||
| 34 | if ( |
||
| 35 | $warpdrive !== null |
||
| 36 | && $warpdrive->getWarpdrivePercentage() < $minimalPercentage |
||
| 37 | ) { |
||
| 38 | $warpdrive->setWarpDrive((int)($warpdrive->getMaxWarpDrive() * $minimalPercentage / 100))->update(); |
||
| 39 | } |
||
| 42 |