1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Loevgaard\DandomainFoundation\Entity; |
4
|
|
|
|
5
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
6
|
|
|
use Doctrine\ORM\Mapping as ORM; |
7
|
|
|
use Loevgaard\DandomainFoundation\Entity\Generated\MediumInterface; |
|
|
|
|
8
|
|
|
use Loevgaard\DandomainFoundation\Entity\Generated\MediumTrait; |
|
|
|
|
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* @ORM\Entity() |
12
|
|
|
* @ORM\Table(name="ldf_media") |
13
|
|
|
*/ |
14
|
|
|
class Medium extends AbstractEntity implements MediumInterface |
15
|
|
|
{ |
16
|
|
|
use MediumTrait; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @var int |
20
|
|
|
* |
21
|
|
|
* @ORM\Id |
22
|
|
|
* @ORM\GeneratedValue |
23
|
|
|
* @ORM\Column(type="integer") |
24
|
|
|
**/ |
25
|
|
|
protected $id; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @var int |
29
|
|
|
* |
30
|
|
|
* @ORM\Column(type="integer", unique=true) |
31
|
|
|
*/ |
32
|
|
|
protected $externalId; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var string|null |
36
|
|
|
* |
37
|
|
|
* @ORM\Column(nullable=true, type="string", length=191) |
38
|
|
|
*/ |
39
|
|
|
protected $height; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @var array|null |
43
|
|
|
* |
44
|
|
|
* @ORM\Column(nullable=true, type="array") |
45
|
|
|
*/ |
46
|
|
|
protected $mediaTranslations; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var int|null |
50
|
|
|
* |
51
|
|
|
* @ORM\Column(nullable=true, type="integer") |
52
|
|
|
*/ |
53
|
|
|
protected $sortOrder; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* @var string|null |
57
|
|
|
* |
58
|
|
|
* @ORM\Column(nullable=true, type="string", length=191) |
59
|
|
|
*/ |
60
|
|
|
protected $thumbnail; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @var string|null |
64
|
|
|
* |
65
|
|
|
* @ORM\Column(nullable=true, type="string", length=191) |
66
|
|
|
*/ |
67
|
|
|
protected $thumbnailHeight; |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @var string|null |
71
|
|
|
* |
72
|
|
|
* @ORM\Column(nullable=true, type="string", length=191) |
73
|
|
|
*/ |
74
|
|
|
protected $thumbnailWidth; |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @var string|null |
78
|
|
|
* |
79
|
|
|
* @ORM\Column(nullable=true, type="string", length=191) |
80
|
|
|
*/ |
81
|
|
|
protected $url; |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @var string|null |
85
|
|
|
* |
86
|
|
|
* @ORM\Column(nullable=true, type="string", length=191) |
87
|
|
|
*/ |
88
|
|
|
protected $width; |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @var Product[]|ArrayCollection |
92
|
|
|
*/ |
93
|
|
|
protected $products; |
94
|
|
|
|
95
|
|
|
public function __construct() |
96
|
|
|
{ |
97
|
|
|
$this->products = new ArrayCollection(); |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* @return int |
102
|
|
|
*/ |
103
|
|
|
public function getId(): int |
104
|
|
|
{ |
105
|
|
|
return (int) $this->id; |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* @param int $id |
110
|
|
|
* |
111
|
|
|
* @return MediumInterface |
112
|
|
|
*/ |
113
|
|
|
public function setId(int $id) |
114
|
|
|
{ |
115
|
|
|
$this->id = $id; |
116
|
|
|
|
117
|
|
|
return $this; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @return int |
122
|
|
|
*/ |
123
|
|
|
public function getExternalId(): int |
124
|
|
|
{ |
125
|
|
|
return (int) $this->externalId; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @param int $externalId |
130
|
|
|
* |
131
|
|
|
* @return MediumInterface |
132
|
|
|
*/ |
133
|
|
|
public function setExternalId(int $externalId) |
134
|
|
|
{ |
135
|
|
|
$this->externalId = $externalId; |
136
|
|
|
|
137
|
|
|
return $this; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* @return null|string |
142
|
|
|
*/ |
143
|
|
|
public function getHeight() |
144
|
|
|
{ |
145
|
|
|
return $this->height; |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
/** |
149
|
|
|
* @param null|string $height |
150
|
|
|
* |
151
|
|
|
* @return MediumInterface |
152
|
|
|
*/ |
153
|
|
|
public function setHeight($height) |
154
|
|
|
{ |
155
|
|
|
$this->height = $height; |
156
|
|
|
|
157
|
|
|
return $this; |
158
|
|
|
} |
159
|
|
|
|
160
|
|
|
/** |
161
|
|
|
* @return array|null |
162
|
|
|
*/ |
163
|
|
|
public function getMediaTranslations() |
164
|
|
|
{ |
165
|
|
|
return $this->mediaTranslations; |
166
|
|
|
} |
167
|
|
|
|
168
|
|
|
/** |
169
|
|
|
* @param array|null $mediaTranslations |
170
|
|
|
* |
171
|
|
|
* @return MediumInterface |
172
|
|
|
*/ |
173
|
|
|
public function setMediaTranslations($mediaTranslations) |
174
|
|
|
{ |
175
|
|
|
$this->mediaTranslations = $mediaTranslations; |
176
|
|
|
|
177
|
|
|
return $this; |
178
|
|
|
} |
179
|
|
|
|
180
|
|
|
/** |
181
|
|
|
* @return int|null |
182
|
|
|
*/ |
183
|
|
|
public function getSortOrder() |
184
|
|
|
{ |
185
|
|
|
return $this->sortOrder; |
186
|
|
|
} |
187
|
|
|
|
188
|
|
|
/** |
189
|
|
|
* @param int|null $sortOrder |
190
|
|
|
* |
191
|
|
|
* @return MediumInterface |
192
|
|
|
*/ |
193
|
|
|
public function setSortOrder($sortOrder) |
194
|
|
|
{ |
195
|
|
|
$this->sortOrder = $sortOrder; |
196
|
|
|
|
197
|
|
|
return $this; |
198
|
|
|
} |
199
|
|
|
|
200
|
|
|
/** |
201
|
|
|
* @return null|string |
202
|
|
|
*/ |
203
|
|
|
public function getThumbnail() |
204
|
|
|
{ |
205
|
|
|
return $this->thumbnail; |
206
|
|
|
} |
207
|
|
|
|
208
|
|
|
/** |
209
|
|
|
* @param null|string $thumbnail |
210
|
|
|
* |
211
|
|
|
* @return MediumInterface |
212
|
|
|
*/ |
213
|
|
|
public function setThumbnail($thumbnail) |
214
|
|
|
{ |
215
|
|
|
$this->thumbnail = $thumbnail; |
216
|
|
|
|
217
|
|
|
return $this; |
218
|
|
|
} |
219
|
|
|
|
220
|
|
|
/** |
221
|
|
|
* @return null|string |
222
|
|
|
*/ |
223
|
|
|
public function getThumbnailHeight() |
224
|
|
|
{ |
225
|
|
|
return $this->thumbnailHeight; |
226
|
|
|
} |
227
|
|
|
|
228
|
|
|
/** |
229
|
|
|
* @param null|string $thumbnailHeight |
230
|
|
|
* |
231
|
|
|
* @return MediumInterface |
232
|
|
|
*/ |
233
|
|
|
public function setThumbnailHeight($thumbnailHeight) |
234
|
|
|
{ |
235
|
|
|
$this->thumbnailHeight = $thumbnailHeight; |
236
|
|
|
|
237
|
|
|
return $this; |
238
|
|
|
} |
239
|
|
|
|
240
|
|
|
/** |
241
|
|
|
* @return null|string |
242
|
|
|
*/ |
243
|
|
|
public function getThumbnailWidth() |
244
|
|
|
{ |
245
|
|
|
return $this->thumbnailWidth; |
246
|
|
|
} |
247
|
|
|
|
248
|
|
|
/** |
249
|
|
|
* @param null|string $thumbnailWidth |
250
|
|
|
* |
251
|
|
|
* @return MediumInterface |
252
|
|
|
*/ |
253
|
|
|
public function setThumbnailWidth($thumbnailWidth) |
254
|
|
|
{ |
255
|
|
|
$this->thumbnailWidth = $thumbnailWidth; |
256
|
|
|
|
257
|
|
|
return $this; |
258
|
|
|
} |
259
|
|
|
|
260
|
|
|
/** |
261
|
|
|
* @return null|string |
262
|
|
|
*/ |
263
|
|
|
public function getUrl() |
264
|
|
|
{ |
265
|
|
|
return $this->url; |
266
|
|
|
} |
267
|
|
|
|
268
|
|
|
/** |
269
|
|
|
* @param null|string $url |
270
|
|
|
* |
271
|
|
|
* @return MediumInterface |
272
|
|
|
*/ |
273
|
|
|
public function setUrl($url) |
274
|
|
|
{ |
275
|
|
|
$this->url = $url; |
276
|
|
|
|
277
|
|
|
return $this; |
278
|
|
|
} |
279
|
|
|
|
280
|
|
|
/** |
281
|
|
|
* @return null|string |
282
|
|
|
*/ |
283
|
|
|
public function getWidth() |
284
|
|
|
{ |
285
|
|
|
return $this->width; |
286
|
|
|
} |
287
|
|
|
|
288
|
|
|
/** |
289
|
|
|
* @param null|string $width |
290
|
|
|
* |
291
|
|
|
* @return MediumInterface |
292
|
|
|
*/ |
293
|
|
|
public function setWidth($width) |
294
|
|
|
{ |
295
|
|
|
$this->width = $width; |
296
|
|
|
|
297
|
|
|
return $this; |
298
|
|
|
} |
299
|
|
|
|
300
|
|
|
/** |
301
|
|
|
* @return ArrayCollection|Product[] |
302
|
|
|
*/ |
303
|
|
|
public function getProducts() |
304
|
|
|
{ |
305
|
|
|
return $this->products; |
306
|
|
|
} |
307
|
|
|
|
308
|
|
|
/** |
309
|
|
|
* @param ArrayCollection|Product[] $products |
310
|
|
|
* |
311
|
|
|
* @return MediumInterface |
312
|
|
|
*/ |
313
|
|
|
public function setProducts($products) |
314
|
|
|
{ |
315
|
|
|
$this->products = $products; |
316
|
|
|
|
317
|
|
|
return $this; |
318
|
|
|
} |
319
|
|
|
} |
320
|
|
|
|
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