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\ProductRelationInterface; |
|
|
|
|
8
|
|
|
use Loevgaard\DandomainFoundation\Entity\Generated\ProductRelationTrait; |
|
|
|
|
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* @ORM\Entity() |
12
|
|
|
* @ORM\Table(name="ldf_product_relations") |
13
|
|
|
*/ |
14
|
|
|
class ProductRelation extends AbstractEntity implements ProductRelationInterface |
15
|
|
|
{ |
16
|
|
|
use ProductRelationTrait; |
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|null |
29
|
|
|
* |
30
|
|
|
* @ORM\Column(nullable=true, type="string", length=191) |
31
|
|
|
*/ |
32
|
|
|
protected $productNumber; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var int|null |
36
|
|
|
* |
37
|
|
|
* @ORM\Column(nullable=true, type="integer") |
38
|
|
|
*/ |
39
|
|
|
protected $relatedType; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @var int|null |
43
|
|
|
* |
44
|
|
|
* @ORM\Column(nullable=true, type="integer") |
45
|
|
|
*/ |
46
|
|
|
protected $sortOrder; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var Product[]|ArrayCollection |
50
|
|
|
* |
51
|
|
|
* @ORM\ManyToMany(mappedBy="productRelations", targetEntity="Product") |
52
|
|
|
*/ |
53
|
|
|
protected $products; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* @return int |
57
|
|
|
*/ |
58
|
|
|
public function getId(): int |
59
|
|
|
{ |
60
|
|
|
return (int) $this->id; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @param int $id |
65
|
|
|
* |
66
|
|
|
* @return ProductRelationInterface |
67
|
|
|
*/ |
68
|
|
|
public function setId(int $id) |
69
|
|
|
{ |
70
|
|
|
$this->id = $id; |
71
|
|
|
|
72
|
|
|
return $this; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @return int|null |
77
|
|
|
*/ |
78
|
|
|
public function getProductNumber() |
79
|
|
|
{ |
80
|
|
|
return $this->productNumber; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @param int|null $productNumber |
85
|
|
|
* |
86
|
|
|
* @return ProductRelationInterface |
87
|
|
|
*/ |
88
|
|
|
public function setProductNumber($productNumber) |
89
|
|
|
{ |
90
|
|
|
$this->productNumber = $productNumber; |
91
|
|
|
|
92
|
|
|
return $this; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @return int|null |
97
|
|
|
*/ |
98
|
|
|
public function getRelatedType() |
99
|
|
|
{ |
100
|
|
|
return $this->relatedType; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
/** |
104
|
|
|
* @param int|null $relatedType |
105
|
|
|
* |
106
|
|
|
* @return ProductRelationInterface |
107
|
|
|
*/ |
108
|
|
|
public function setRelatedType($relatedType) |
109
|
|
|
{ |
110
|
|
|
$this->relatedType = $relatedType; |
111
|
|
|
|
112
|
|
|
return $this; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @return int|null |
117
|
|
|
*/ |
118
|
|
|
public function getSortOrder() |
119
|
|
|
{ |
120
|
|
|
return $this->sortOrder; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @param int|null $sortOrder |
125
|
|
|
* |
126
|
|
|
* @return ProductRelationInterface |
127
|
|
|
*/ |
128
|
|
|
public function setSortOrder($sortOrder) |
129
|
|
|
{ |
130
|
|
|
$this->sortOrder = $sortOrder; |
131
|
|
|
|
132
|
|
|
return $this; |
133
|
|
|
} |
134
|
|
|
|
135
|
|
|
/** |
136
|
|
|
* @return ArrayCollection|Product[] |
137
|
|
|
*/ |
138
|
|
|
public function getProducts() |
139
|
|
|
{ |
140
|
|
|
return $this->products; |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* @param ArrayCollection|Product[] $products |
145
|
|
|
* |
146
|
|
|
* @return ProductRelationInterface |
147
|
|
|
*/ |
148
|
|
|
public function setProducts($products) |
149
|
|
|
{ |
150
|
|
|
$this->products = $products; |
151
|
|
|
|
152
|
|
|
return $this; |
153
|
|
|
} |
154
|
|
|
} |
155
|
|
|
|
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