|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Stu\Orm\Entity; |
|
6
|
|
|
|
|
7
|
|
|
use Doctrine\ORM\Mapping\Column; |
|
8
|
|
|
use Doctrine\ORM\Mapping\Entity; |
|
9
|
|
|
use Doctrine\ORM\Mapping\GeneratedValue; |
|
10
|
|
|
use Doctrine\ORM\Mapping\Id; |
|
11
|
|
|
use Doctrine\ORM\Mapping\Index; |
|
12
|
|
|
use Doctrine\ORM\Mapping\JoinColumn; |
|
13
|
|
|
use Doctrine\ORM\Mapping\ManyToOne; |
|
14
|
|
|
use Doctrine\ORM\Mapping\Table; |
|
15
|
|
|
use Override; |
|
|
|
|
|
|
16
|
|
|
use Stu\Component\Spacecraft\ModuleSpecialAbilityEnum; |
|
17
|
|
|
use Stu\Orm\Repository\ModuleSpecialRepository; |
|
18
|
|
|
|
|
19
|
|
|
#[Table(name: 'stu_modules_specials')] |
|
20
|
|
|
#[Index(name: 'module_special_module_idx', columns: ['module_id'])] |
|
21
|
|
|
#[Entity(repositoryClass: ModuleSpecialRepository::class)] |
|
22
|
|
|
class ModuleSpecial implements ModuleSpecialInterface |
|
23
|
|
|
{ |
|
24
|
|
|
#[Id] |
|
25
|
|
|
#[Column(type: 'integer')] |
|
26
|
|
|
#[GeneratedValue(strategy: 'IDENTITY')] |
|
27
|
|
|
private int $id; |
|
28
|
|
|
|
|
29
|
|
|
#[Column(type: 'integer')] |
|
30
|
|
|
private int $module_id = 0; |
|
31
|
|
|
|
|
32
|
|
|
#[Column(type: 'smallint', enumType: ModuleSpecialAbilityEnum::class)] |
|
33
|
|
|
private ModuleSpecialAbilityEnum $special_id = ModuleSpecialAbilityEnum::RPG; |
|
34
|
|
|
|
|
35
|
|
|
#[ManyToOne(targetEntity: 'Module', inversedBy: 'moduleSpecials')] |
|
36
|
|
|
#[JoinColumn(name: 'module_id', referencedColumnName: 'id')] |
|
37
|
|
|
private ModuleInterface $module; |
|
|
|
|
|
|
38
|
|
|
|
|
39
|
|
|
#[Override] |
|
40
|
|
|
public function getId(): int |
|
41
|
|
|
{ |
|
42
|
|
|
return $this->id; |
|
43
|
|
|
} |
|
44
|
|
|
|
|
45
|
|
|
#[Override] |
|
46
|
|
|
public function getModuleId(): int |
|
47
|
|
|
{ |
|
48
|
|
|
return $this->module_id; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
#[Override] |
|
52
|
|
|
public function setModuleId(int $moduleId): ModuleSpecialInterface |
|
53
|
|
|
{ |
|
54
|
|
|
$this->module_id = $moduleId; |
|
55
|
|
|
|
|
56
|
|
|
return $this; |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
3 |
|
#[Override] |
|
60
|
|
|
public function getSpecialId(): ModuleSpecialAbilityEnum |
|
61
|
|
|
{ |
|
62
|
3 |
|
return $this->special_id; |
|
63
|
|
|
} |
|
64
|
|
|
|
|
65
|
|
|
#[Override] |
|
66
|
|
|
public function setSpecialId(ModuleSpecialAbilityEnum $specialId): ModuleSpecialInterface |
|
67
|
|
|
{ |
|
68
|
|
|
$this->special_id = $specialId; |
|
69
|
|
|
|
|
70
|
|
|
return $this; |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
3 |
|
#[Override] |
|
74
|
|
|
public function getName(): string |
|
75
|
|
|
{ |
|
76
|
3 |
|
return $this->getSpecialId()->getDescription(); |
|
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