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\Id; |
10
|
|
|
use Doctrine\ORM\Mapping\JoinColumn; |
11
|
|
|
use Doctrine\ORM\Mapping\ManyToOne; |
12
|
|
|
use Doctrine\ORM\Mapping\Table; |
13
|
|
|
use Override; |
|
|
|
|
14
|
|
|
use Stu\Module\PlayerSetting\Lib\UserSettingEnum; |
15
|
|
|
use Stu\Orm\Repository\UserSettingRepository; |
16
|
|
|
|
17
|
|
|
#[Table(name: 'stu_user_setting')] |
18
|
|
|
#[Entity(repositoryClass: UserSettingRepository::class)] |
19
|
|
|
class UserSetting implements UserSettingInterface |
20
|
|
|
{ |
21
|
|
|
#[Id] |
22
|
|
|
#[Column(type: 'integer')] |
23
|
|
|
private int $user_id; |
24
|
|
|
|
25
|
|
|
#[Id] |
26
|
|
|
#[Column(type: 'string', enumType: UserSettingEnum::class)] |
27
|
|
|
private UserSettingEnum $setting; |
28
|
|
|
|
29
|
|
|
#[Column(type: 'string')] |
30
|
|
|
private string $value = ''; |
31
|
|
|
|
32
|
|
|
#[ManyToOne(targetEntity: 'User')] |
33
|
|
|
#[JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
34
|
|
|
private UserInterface $user; |
35
|
|
|
|
36
|
|
|
#[Override] |
37
|
|
|
public function setUser(UserInterface $user): UserSettingInterface |
38
|
|
|
{ |
39
|
|
|
$this->user = $user; |
40
|
|
|
$this->user_id = $user->getId(); |
41
|
|
|
|
42
|
|
|
return $this; |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
#[Override] |
46
|
|
|
public function setSetting(UserSettingEnum $setting): UserSettingInterface |
47
|
|
|
{ |
48
|
|
|
$this->setting = $setting; |
49
|
|
|
|
50
|
|
|
return $this; |
51
|
|
|
} |
52
|
|
|
|
53
|
1 |
|
#[Override] |
54
|
|
|
public function getValue(): string |
55
|
|
|
{ |
56
|
1 |
|
return $this->value; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
#[Override] |
60
|
|
|
public function setValue(string $value): UserSettingInterface |
61
|
|
|
{ |
62
|
|
|
$this->value = $value; |
63
|
|
|
|
64
|
|
|
return $this; |
65
|
|
|
} |
66
|
|
|
} |
67
|
|
|
|
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