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\UserCharacterRepository; |
16
|
|
|
|
17
|
|
|
#[Entity(repositoryClass: UserCharacterRepository::class)] |
18
|
|
|
#[Table(name: 'stu_user_character')] |
19
|
|
|
class UserCharacter implements UserCharacterInterface |
20
|
|
|
{ |
21
|
|
|
#[Id] |
22
|
|
|
#[Column(type: 'integer')] |
23
|
|
|
#[GeneratedValue(strategy: 'IDENTITY')] |
24
|
|
|
private int $id; |
25
|
|
|
|
26
|
|
|
#[ManyToOne(targetEntity: 'User')] |
27
|
|
|
#[JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
28
|
|
|
private UserInterface $user; |
29
|
|
|
|
30
|
|
|
#[Column(type: 'string')] |
31
|
|
|
private string $name; |
32
|
|
|
|
33
|
|
|
#[Column(type: 'text', nullable: true)] |
34
|
|
|
private ?string $description = null; |
35
|
|
|
|
36
|
|
|
#[Column(type: 'string', length: 32, nullable: true)] |
37
|
|
|
private ?string $avatar = null; |
38
|
|
|
|
39
|
|
|
#[Column(type: 'integer', nullable: true)] |
40
|
|
|
private ?int $former_user_id = null; |
41
|
|
|
|
42
|
|
|
#[Override] |
43
|
|
|
public function getId(): int |
44
|
|
|
{ |
45
|
|
|
return $this->id; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
#[Override] |
49
|
|
|
public function getUser(): UserInterface |
50
|
|
|
{ |
51
|
|
|
return $this->user; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
#[Override] |
55
|
|
|
public function setUser(UserInterface $user): UserCharacterInterface |
56
|
|
|
{ |
57
|
|
|
$this->user = $user; |
58
|
|
|
return $this; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
#[Override] |
62
|
|
|
public function getName(): string |
63
|
|
|
{ |
64
|
|
|
return $this->name; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
#[Override] |
68
|
|
|
public function setName(string $name): UserCharacterInterface |
69
|
|
|
{ |
70
|
|
|
$this->name = $name; |
71
|
|
|
return $this; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
#[Override] |
75
|
|
|
public function getDescription(): ?string |
76
|
|
|
{ |
77
|
|
|
return $this->description; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
#[Override] |
81
|
|
|
public function setDescription(?string $description): UserCharacterInterface |
82
|
|
|
{ |
83
|
|
|
$this->description = $description; |
84
|
|
|
return $this; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
#[Override] |
88
|
|
|
public function getAvatar(): ?string |
89
|
|
|
{ |
90
|
|
|
return $this->avatar; |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
#[Override] |
94
|
|
|
public function setAvatar(?string $avatar): UserCharacterInterface |
95
|
|
|
{ |
96
|
|
|
$this->avatar = $avatar; |
97
|
|
|
return $this; |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
#[Override] |
101
|
|
|
public function getFormerUserId(): ?int |
102
|
|
|
{ |
103
|
|
|
return $this->former_user_id; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
#[Override] |
107
|
|
|
public function setFormerUserId(?int $formerUserId): UserCharacterInterface |
108
|
|
|
{ |
109
|
|
|
$this->former_user_id = $formerUserId; |
110
|
|
|
return $this; |
111
|
|
|
} |
112
|
|
|
} |
113
|
|
|
|
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