|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Stu\Module\Game\Component; |
|
6
|
|
|
|
|
7
|
|
|
use Override; |
|
|
|
|
|
|
8
|
|
|
use Stu\Component\Game\ModuleViewEnum; |
|
9
|
|
|
use Stu\Lib\Component\ComponentEnumInterface; |
|
10
|
|
|
|
|
11
|
|
|
enum GameComponentEnum: string implements ComponentEnumInterface |
|
12
|
|
|
{ |
|
13
|
|
|
case COLONIES = 'COLONIES_NAVLET'; |
|
14
|
|
|
case NAVIGATION = 'NAVIGATION'; |
|
15
|
|
|
case NAGUS = 'NAGUS_POPUP'; |
|
16
|
|
|
case PM = 'PM_NAVLET'; |
|
17
|
|
|
case RESEARCH = 'RESEARCH_NAVLET'; |
|
18
|
|
|
case SERVERTIME_AND_VERSION = 'SERVERTIME'; |
|
19
|
|
|
case USER = 'USER_PROFILE'; |
|
20
|
|
|
|
|
21
|
11 |
|
#[Override] |
|
22
|
|
|
public function getModuleView(): ModuleViewEnum |
|
23
|
|
|
{ |
|
24
|
11 |
|
return ModuleViewEnum::GAME; |
|
25
|
|
|
} |
|
26
|
|
|
|
|
27
|
4 |
|
#[Override] |
|
28
|
|
|
public function getTemplate(): string |
|
29
|
|
|
{ |
|
30
|
4 |
|
return match ($this) { |
|
31
|
4 |
|
self::COLONIES => 'html/game/component/coloniesComponent.twig', |
|
32
|
4 |
|
self::NAVIGATION => 'html/game/component/navigationComponent.twig', |
|
33
|
4 |
|
self::NAGUS => 'html/game/component/nagusComponent.twig', |
|
34
|
4 |
|
self::PM => 'html/game/component/pmComponent.twig', |
|
35
|
3 |
|
self::RESEARCH => 'html/game/component/researchComponent.twig', |
|
36
|
3 |
|
self::SERVERTIME_AND_VERSION => 'html/game/component/serverTimeAndVersionComponent.twig', |
|
37
|
4 |
|
self::USER => 'html/game/component/userComponent.twig', |
|
38
|
4 |
|
}; |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
7 |
|
#[Override] |
|
42
|
|
|
public function getRefreshIntervalInSeconds(): ?int |
|
43
|
|
|
{ |
|
44
|
7 |
|
return match ($this) { |
|
45
|
7 |
|
self::PM => 60, |
|
46
|
5 |
|
self::SERVERTIME_AND_VERSION => 300, |
|
47
|
7 |
|
default => null |
|
48
|
7 |
|
}; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
4 |
|
#[Override] |
|
52
|
|
|
public function hasTemplateVariables(): bool |
|
53
|
|
|
{ |
|
54
|
4 |
|
return match ($this) { |
|
55
|
4 |
|
self::NAVIGATION => false, |
|
56
|
4 |
|
default => true |
|
57
|
4 |
|
}; |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
7 |
|
#[Override] |
|
61
|
|
|
public function getValue(): string |
|
62
|
|
|
{ |
|
63
|
7 |
|
return $this->value; |
|
64
|
|
|
} |
|
65
|
|
|
} |
|
66
|
|
|
|
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