|
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\JoinColumn; |
|
12
|
|
|
use Doctrine\ORM\Mapping\ManyToOne; |
|
13
|
|
|
use Doctrine\ORM\Mapping\Table; |
|
14
|
|
|
use Override; |
|
|
|
|
|
|
15
|
|
|
use Stu\Orm\Repository\UserPirateRoundRepository; |
|
16
|
|
|
|
|
17
|
|
|
#[Table(name: 'stu_user_pirate_round')] |
|
18
|
|
|
#[Entity(repositoryClass: UserPirateRoundRepository::class)] |
|
19
|
|
|
class UserPirateRound implements UserPirateRoundInterface |
|
20
|
|
|
{ |
|
21
|
|
|
#[Id] |
|
22
|
|
|
#[Column(type: 'integer')] |
|
23
|
|
|
#[GeneratedValue(strategy: 'IDENTITY')] |
|
24
|
|
|
private int $id; |
|
25
|
|
|
|
|
26
|
|
|
#[Column(type: 'integer')] |
|
27
|
|
|
private int $user_id = 0; |
|
28
|
|
|
|
|
29
|
|
|
#[Column(type: 'integer')] |
|
30
|
|
|
private int $pirate_round_id = 0; |
|
31
|
|
|
|
|
32
|
|
|
#[Column(type: 'integer')] |
|
33
|
|
|
private int $destroyed_ships = 0; |
|
34
|
|
|
|
|
35
|
|
|
#[Column(type: 'integer')] |
|
36
|
|
|
private int $prestige = 0; |
|
37
|
|
|
|
|
38
|
|
|
#[ManyToOne(targetEntity: 'User')] |
|
39
|
|
|
#[JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
|
40
|
|
|
private UserInterface $user; |
|
41
|
|
|
|
|
42
|
|
|
#[ManyToOne(targetEntity: 'PirateRound')] |
|
43
|
|
|
#[JoinColumn(name: 'pirate_round_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
|
44
|
|
|
private PirateRoundInterface $pirateRound; |
|
45
|
|
|
|
|
46
|
|
|
#[Override] |
|
47
|
|
|
public function getId(): int |
|
48
|
|
|
{ |
|
49
|
|
|
return $this->id; |
|
50
|
|
|
} |
|
51
|
|
|
|
|
52
|
|
|
#[Override] |
|
53
|
|
|
public function getUserId(): int |
|
54
|
|
|
{ |
|
55
|
|
|
return $this->user_id; |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
#[Override] |
|
59
|
|
|
public function setUser(UserInterface $user): UserPirateRoundInterface |
|
60
|
|
|
{ |
|
61
|
|
|
$this->user = $user; |
|
62
|
|
|
$this->user_id = $user->getId(); |
|
63
|
|
|
return $this; |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
#[Override] |
|
67
|
|
|
public function getUser(): UserInterface |
|
68
|
|
|
{ |
|
69
|
|
|
return $this->user; |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
#[Override] |
|
73
|
|
|
public function getPirateRoundId(): int |
|
74
|
|
|
{ |
|
75
|
|
|
return $this->pirate_round_id; |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
#[Override] |
|
79
|
|
|
public function setPirateRound(PirateRoundInterface $pirateRound): UserPirateRoundInterface |
|
80
|
|
|
{ |
|
81
|
|
|
$this->pirateRound = $pirateRound; |
|
82
|
|
|
$this->pirate_round_id = $pirateRound->getId(); |
|
83
|
|
|
return $this; |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
#[Override] |
|
87
|
|
|
public function getPirateRound(): PirateRoundInterface |
|
88
|
|
|
{ |
|
89
|
|
|
return $this->pirateRound; |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
#[Override] |
|
93
|
|
|
public function getDestroyedShips(): int |
|
94
|
|
|
{ |
|
95
|
|
|
return $this->destroyed_ships; |
|
96
|
|
|
} |
|
97
|
|
|
|
|
98
|
|
|
#[Override] |
|
99
|
|
|
public function setDestroyedShips(int $destroyedShips): UserPirateRoundInterface |
|
100
|
|
|
{ |
|
101
|
|
|
$this->destroyed_ships = $destroyedShips; |
|
102
|
|
|
return $this; |
|
103
|
|
|
} |
|
104
|
|
|
|
|
105
|
|
|
#[Override] |
|
106
|
|
|
public function getPrestige(): int |
|
107
|
|
|
{ |
|
108
|
|
|
return $this->prestige; |
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
#[Override] |
|
112
|
|
|
public function setPrestige(int $prestige): UserPirateRoundInterface |
|
113
|
|
|
{ |
|
114
|
|
|
$this->prestige = $prestige; |
|
115
|
|
|
return $this; |
|
116
|
|
|
} |
|
117
|
|
|
} |
|
118
|
|
|
|
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