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