1 | <?php |
||
2 | |||
3 | namespace Loevgaard\DandomainFoundation\Entity; |
||
4 | |||
5 | use Doctrine\ORM\Mapping as ORM; |
||
6 | use Loevgaard\DandomainFoundation\Entity\Generated\PeriodInterface; |
||
0 ignored issues
–
show
|
|||
7 | use Loevgaard\DandomainFoundation\Entity\Generated\PeriodTrait; |
||
0 ignored issues
–
show
The type
Loevgaard\DandomainFound...y\Generated\PeriodTrait was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
8 | |||
9 | /** |
||
10 | * @ORM\Entity() |
||
11 | * @ORM\Table(name="ldf_periods") |
||
12 | */ |
||
13 | class Period extends AbstractEntity implements PeriodInterface |
||
14 | { |
||
15 | use PeriodTrait; |
||
16 | |||
17 | protected $hydrateConversions = [ |
||
18 | 'id' => 'externalId', |
||
19 | ]; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | * |
||
24 | * @ORM\Id |
||
25 | * @ORM\GeneratedValue |
||
26 | * @ORM\Column(type="integer") |
||
27 | **/ |
||
28 | protected $id; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | * |
||
33 | * @ORM\Column(type="string", unique=true, length=191) |
||
34 | */ |
||
35 | protected $externalId; |
||
36 | |||
37 | /** |
||
38 | * @var bool|null |
||
39 | * |
||
40 | * @ORM\Column(nullable=true, type="boolean") |
||
41 | */ |
||
42 | protected $disabled; |
||
43 | |||
44 | /** |
||
45 | * @var \DateTimeImmutable|null |
||
46 | * |
||
47 | * @ORM\Column(nullable=true, type="datetime_immutable") |
||
48 | */ |
||
49 | protected $endDate; |
||
50 | |||
51 | /** |
||
52 | * @var \DateTimeImmutable|null |
||
53 | * |
||
54 | * @ORM\Column(nullable=true, type="datetime_immutable") |
||
55 | */ |
||
56 | protected $startDate; |
||
57 | |||
58 | /** |
||
59 | * @var string|null |
||
60 | * |
||
61 | * @ORM\Column(nullable=true, type="string", length=191) |
||
62 | */ |
||
63 | protected $title; |
||
64 | |||
65 | 3 | public function hydrate(array $data, bool $useConversions = false, $scalarsOnly = true) |
|
66 | { |
||
67 | 3 | $data['startDate'] = $this->getDateTimeFromJson($data['startDate']); |
|
68 | 3 | $data['endDate'] = $this->getDateTimeFromJson($data['endDate']); |
|
69 | |||
70 | 3 | parent::hydrate($data, $useConversions, $scalarsOnly); |
|
71 | 3 | } |
|
72 | |||
73 | 4 | /** |
|
74 | * @return int |
||
75 | 4 | */ |
|
76 | 2 | public function getId(): int |
|
77 | { |
||
78 | 2 | return (int) $this->id; |
|
79 | } |
||
80 | |||
81 | 2 | /** |
|
82 | * @param int $id |
||
83 | 2 | * |
|
84 | * @return PeriodInterface |
||
85 | 2 | */ |
|
86 | 1 | public function setId(int $id) |
|
87 | { |
||
88 | 5 | $this->id = $id; |
|
89 | |||
90 | 5 | return $this; |
|
91 | } |
||
92 | |||
93 | /** |
||
94 | * @return string |
||
95 | */ |
||
96 | 4 | public function getExternalId(): string |
|
97 | { |
||
98 | 4 | return (string) $this->externalId; |
|
99 | } |
||
100 | 2 | ||
101 | /** |
||
102 | * @param string $externalId |
||
103 | * |
||
104 | * @return PeriodInterface |
||
105 | */ |
||
106 | 3 | public function setExternalId(string $externalId) |
|
107 | { |
||
108 | 3 | $this->externalId = $externalId; |
|
109 | |||
110 | 1 | return $this; |
|
111 | } |
||
112 | |||
113 | /** |
||
114 | * @return bool|null |
||
115 | */ |
||
116 | 3 | public function getDisabled() |
|
117 | { |
||
118 | 3 | return $this->disabled; |
|
119 | } |
||
120 | 2 | ||
121 | /** |
||
122 | * @param bool|null $disabled |
||
123 | * |
||
124 | * @return PeriodInterface |
||
125 | */ |
||
126 | 3 | public function setDisabled($disabled) |
|
127 | { |
||
128 | 3 | $this->disabled = $disabled; |
|
129 | |||
130 | 1 | return $this; |
|
131 | } |
||
132 | |||
133 | /** |
||
134 | * @return \DateTimeImmutable|null |
||
135 | */ |
||
136 | 3 | public function getEndDate() |
|
137 | { |
||
138 | 3 | return $this->endDate; |
|
139 | } |
||
140 | 2 | ||
141 | /** |
||
142 | * @param \DateTimeImmutable|null $endDate |
||
143 | * |
||
144 | * @return PeriodInterface |
||
145 | */ |
||
146 | 3 | public function setEndDate($endDate) |
|
147 | { |
||
148 | 3 | $this->endDate = $endDate; |
|
149 | |||
150 | 1 | return $this; |
|
151 | } |
||
152 | |||
153 | /** |
||
154 | * @return \DateTimeImmutable|null |
||
155 | */ |
||
156 | 3 | public function getStartDate() |
|
157 | { |
||
158 | 3 | return $this->startDate; |
|
159 | } |
||
160 | 2 | ||
161 | /** |
||
162 | * @param \DateTimeImmutable|null $startDate |
||
163 | * |
||
164 | * @return PeriodInterface |
||
165 | */ |
||
166 | 3 | public function setStartDate($startDate) |
|
167 | { |
||
168 | 3 | $this->startDate = $startDate; |
|
169 | |||
170 | 1 | return $this; |
|
171 | } |
||
172 | |||
173 | /** |
||
174 | * @return null|string |
||
175 | */ |
||
176 | 3 | public function getTitle() |
|
177 | { |
||
178 | 3 | return $this->title; |
|
179 | } |
||
180 | 2 | ||
181 | /** |
||
182 | * @param null|string $title |
||
183 | * |
||
184 | * @return PeriodInterface |
||
185 | */ |
||
186 | 1 | public function setTitle($title) |
|
187 | { |
||
188 | 1 | $this->title = $title; |
|
189 | |||
190 | 1 | return $this; |
|
191 | } |
||
192 | } |
||
193 |
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