| Conditions | 4 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | #[Override] |
||
| 26 | public function cancelMining(ShipInterface $ship, ShipWrapperInterface $wrapper): bool |
||
| 27 | { |
||
| 28 | |||
| 29 | |||
| 30 | $state = $ship->getState(); |
||
| 31 | if ($state === ShipStateEnum::SHIP_STATE_GATHER_RESOURCES) { |
||
| 32 | if ($ship->isSystemHealthy(ShipSystemTypeEnum::SYSTEM_BUSSARD_COLLECTOR)) { |
||
| 33 | $wrapper->getShipSystemManager()->deactivate($wrapper, ShipSystemTypeEnum::SYSTEM_BUSSARD_COLLECTOR, true); |
||
| 34 | } |
||
| 35 | |||
| 36 | $miningQueue = $this->miningQueueRepository->getByShip($ship->getId()); |
||
| 37 | if ($miningQueue !== null) { |
||
| 38 | $this->miningQueueRepository->truncateByShipId($ship->getId()); |
||
| 39 | } |
||
| 40 | $this->setStateNoneAndSave($ship); |
||
| 41 | } |
||
| 42 | return false; |
||
| 43 | } |
||
| 51 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths