|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Stu\Module\Station\Lib; |
|
4
|
|
|
|
|
5
|
|
|
use Override; |
|
|
|
|
|
|
6
|
|
|
use Stu\Component\Spacecraft\Repair\RepairUtilInterface; |
|
7
|
|
|
use Stu\Component\Spacecraft\SpacecraftStateEnum; |
|
8
|
|
|
use Stu\Component\Spacecraft\System\Data\AggregationSystemSystemData; |
|
9
|
|
|
use Stu\Component\Spacecraft\System\SpacecraftSystemManagerInterface; |
|
10
|
|
|
use Stu\Component\Spacecraft\System\SpacecraftSystemTypeEnum; |
|
11
|
|
|
use Stu\Component\Spacecraft\System\SystemDataDeserializerInterface; |
|
12
|
|
|
use Stu\Module\Control\GameControllerInterface; |
|
13
|
|
|
use Stu\Module\Ship\Lib\FleetWrapperInterface; |
|
14
|
|
|
use Stu\Module\Spacecraft\Lib\SpacecraftStateChangerInterface; |
|
15
|
|
|
use Stu\Module\Spacecraft\Lib\SpacecraftWrapperFactoryInterface; |
|
16
|
|
|
use Stu\Module\Spacecraft\Lib\Ui\StateIconAndTitle; |
|
17
|
|
|
use Stu\Module\Spacecraft\Lib\SpacecraftWrapper; |
|
18
|
|
|
use Stu\Orm\Entity\StationInterface; |
|
19
|
|
|
use Stu\Orm\Repository\TorpedoTypeRepositoryInterface; |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* @extends SpacecraftWrapper<StationInterface> |
|
23
|
|
|
*/ |
|
24
|
|
|
class StationWrapper extends SpacecraftWrapper implements StationWrapperInterface |
|
25
|
|
|
{ |
|
26
|
21 |
|
public function __construct( |
|
27
|
|
|
StationInterface $station, |
|
28
|
|
|
SpacecraftSystemManagerInterface $spacecraftSystemManager, |
|
29
|
|
|
SystemDataDeserializerInterface $systemDataDeserializer, |
|
30
|
|
|
TorpedoTypeRepositoryInterface $torpedoTypeRepository, |
|
31
|
|
|
GameControllerInterface $game, |
|
32
|
|
|
SpacecraftWrapperFactoryInterface $spacecraftWrapperFactory, |
|
33
|
|
|
SpacecraftStateChangerInterface $spacecraftStateChanger, |
|
34
|
|
|
RepairUtilInterface $repairUtil, |
|
35
|
|
|
StateIconAndTitle $stateIconAndTitle |
|
36
|
|
|
) { |
|
37
|
21 |
|
parent::__construct( |
|
38
|
21 |
|
$station, |
|
39
|
21 |
|
$spacecraftSystemManager, |
|
40
|
21 |
|
$systemDataDeserializer, |
|
41
|
21 |
|
$torpedoTypeRepository, |
|
42
|
21 |
|
$game, |
|
43
|
21 |
|
$spacecraftWrapperFactory, |
|
44
|
21 |
|
$spacecraftStateChanger, |
|
45
|
21 |
|
$repairUtil, |
|
46
|
21 |
|
$stateIconAndTitle |
|
47
|
21 |
|
); |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
21 |
|
#[Override] |
|
51
|
|
|
public function get(): StationInterface |
|
52
|
|
|
{ |
|
53
|
21 |
|
return $this->spacecraft; |
|
|
|
|
|
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
#[Override] |
|
57
|
|
|
public function getFleetWrapper(): ?FleetWrapperInterface |
|
58
|
|
|
{ |
|
59
|
|
|
return null; |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
3 |
|
#[Override] |
|
63
|
|
|
public function canBeScrapped(): bool |
|
64
|
|
|
{ |
|
65
|
3 |
|
$station = $this->get(); |
|
66
|
|
|
|
|
67
|
3 |
|
return $station->getState() !== SpacecraftStateEnum::SHIP_STATE_UNDER_SCRAPPING; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
1 |
|
#[Override] |
|
71
|
|
|
public function getAggregationSystemSystemData(): ?AggregationSystemSystemData |
|
72
|
|
|
{ |
|
73
|
1 |
|
return $this->getSpecificShipSystem( |
|
74
|
1 |
|
SpacecraftSystemTypeEnum::AGGREGATION_SYSTEM, |
|
75
|
1 |
|
AggregationSystemSystemData::class |
|
76
|
1 |
|
); |
|
77
|
|
|
} |
|
78
|
|
|
} |
|
79
|
|
|
|
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