1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Stu\Lib\Interaction\Member; |
4
|
|
|
|
5
|
|
|
use Override; |
|
|
|
|
6
|
|
|
use Stu\Component\Anomaly\Type\AnomalyTypeEnum; |
7
|
|
|
use Stu\Lib\Interaction\InteractionCheckType; |
8
|
|
|
use Stu\Module\Ship\Lib\TholianWebUtilInterface; |
9
|
|
|
use Stu\Orm\Entity\ColonyInterface; |
10
|
|
|
use Stu\Orm\Entity\MapInterface; |
11
|
|
|
use Stu\Orm\Entity\StarSystemMapInterface; |
12
|
|
|
use Stu\Orm\Entity\UserInterface; |
13
|
|
|
|
14
|
|
|
class ColonyMember implements InteractionMemberInterface |
15
|
|
|
{ |
16
|
4 |
|
public function __construct( |
17
|
|
|
private TholianWebUtilInterface $tholianWebUtil, |
18
|
|
|
private ColonyInterface $colony |
19
|
4 |
|
) {} |
20
|
|
|
|
21
|
2 |
|
#[Override] |
22
|
|
|
public function get(): ColonyInterface |
23
|
|
|
{ |
24
|
2 |
|
return $this->colony; |
25
|
|
|
} |
26
|
|
|
|
27
|
2 |
|
#[Override] |
28
|
|
|
public function canAccess( |
29
|
|
|
InteractionMemberInterface $other, |
30
|
|
|
callable $shouldCheck |
31
|
|
|
): ?InteractionCheckType { |
32
|
2 |
|
return null; |
33
|
|
|
} |
34
|
|
|
|
35
|
2 |
|
#[Override] |
36
|
|
|
public function canBeAccessedFrom( |
37
|
|
|
InteractionMemberInterface $other, |
38
|
|
|
bool $isFriend, |
39
|
|
|
callable $shouldCheck |
40
|
|
|
): ?InteractionCheckType { |
41
|
|
|
|
42
|
|
|
if ( |
43
|
2 |
|
$shouldCheck(InteractionCheckType::EXPECT_TARGET_DOCKED_OR_NO_ION_STORM) |
44
|
2 |
|
&& $this->colony->getLocation()->hasAnomaly(AnomalyTypeEnum::ION_STORM) |
45
|
|
|
) { |
46
|
|
|
return InteractionCheckType::EXPECT_TARGET_DOCKED_OR_NO_ION_STORM; |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
if ( |
50
|
2 |
|
$shouldCheck(InteractionCheckType::EXPECT_TARGET_ALSO_IN_FINISHED_WEB) |
51
|
2 |
|
&& $this->tholianWebUtil->isTargetOutsideFinishedTholianWeb($other->get(), $this->colony) |
52
|
|
|
) { |
53
|
|
|
return InteractionCheckType::EXPECT_TARGET_ALSO_IN_FINISHED_WEB; |
54
|
|
|
} |
55
|
|
|
|
56
|
2 |
|
return null; |
57
|
|
|
} |
58
|
|
|
|
59
|
4 |
|
#[Override] |
60
|
|
|
public function getLocation(): MapInterface|StarSystemMapInterface |
61
|
|
|
{ |
62
|
4 |
|
return $this->colony->getLocation(); |
63
|
|
|
} |
64
|
|
|
|
65
|
4 |
|
#[Override] |
66
|
|
|
public function getUser(): ?UserInterface |
67
|
|
|
{ |
68
|
4 |
|
return $this->colony->getUser(); |
69
|
|
|
} |
70
|
|
|
} |
71
|
|
|
|
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