1 | <?php |
||
12 | class Definition |
||
13 | { |
||
14 | /** |
||
15 | * @var int |
||
16 | * |
||
17 | * @ORM\Id |
||
18 | * @ORM\Column(type="integer") |
||
19 | * @ORM\GeneratedValue(strategy="AUTO") |
||
20 | */ |
||
21 | private $id; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | * |
||
26 | * @ORM\Column(type="string", length=255) |
||
27 | */ |
||
28 | private $name; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | * |
||
33 | * @ORM\Column(type="text", nullable=true) |
||
34 | */ |
||
35 | private $description; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | * |
||
40 | * @ORM\Column(type="string", length=100) |
||
41 | */ |
||
42 | private $type; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | * |
||
47 | * @ORM\Column(type="string", length=255, nullable=true) |
||
48 | */ |
||
49 | private $unit; |
||
50 | |||
51 | /** |
||
52 | * @var boolean |
||
53 | * |
||
54 | * @ORM\Column(type="boolean") |
||
55 | */ |
||
56 | private $required = false; |
||
57 | |||
58 | /** |
||
59 | * @var string |
||
60 | * |
||
61 | * @ORM\Column(type="integer", nullable=true) |
||
62 | */ |
||
63 | private $orderIndex; |
||
64 | |||
65 | /** |
||
66 | * @var Schema |
||
67 | * |
||
68 | * @ORM\ManyToOne(targetEntity="Schema", inversedBy="definitions") |
||
69 | * @ORM\JoinColumn(name="schema_id", referencedColumnName="id") |
||
70 | */ |
||
71 | private $schema; |
||
72 | |||
73 | /** |
||
74 | * @var ArrayCollection |
||
75 | * |
||
76 | * @ORM\OneToMany( |
||
77 | * targetEntity="Option", |
||
78 | * mappedBy="definition", |
||
79 | * orphanRemoval=true, |
||
80 | * cascade={"persist", "remove"}, |
||
81 | * fetch="EXTRA_LAZY" |
||
82 | * ) |
||
83 | * @ORM\OrderBy({"id" = "ASC"}) |
||
84 | */ |
||
85 | private $options; |
||
86 | |||
87 | /** |
||
88 | * @var Attribute |
||
89 | * |
||
90 | * @ORM\OneToMany( |
||
91 | * targetEntity="\Padam87\AttributeBundle\Entity\Attribute", |
||
92 | * mappedBy="definition", |
||
93 | * cascade={"remove"} |
||
94 | * ) |
||
95 | */ |
||
96 | private $attributes; |
||
97 | |||
98 | public function __construct() |
||
103 | |||
104 | /** |
||
105 | * @return mixed |
||
106 | */ |
||
107 | public function __toString() |
||
111 | |||
112 | /** |
||
113 | * @return integer |
||
114 | */ |
||
115 | public function getId() |
||
119 | |||
120 | /** |
||
121 | * @param string $name |
||
122 | * |
||
123 | * @return $this |
||
124 | */ |
||
125 | public function setName($name) |
||
131 | |||
132 | /** |
||
133 | * @return string |
||
134 | */ |
||
135 | public function getName() |
||
139 | |||
140 | /** |
||
141 | * @param string $description |
||
142 | * |
||
143 | * @return $this |
||
144 | */ |
||
145 | public function setDescription($description) |
||
151 | |||
152 | /** |
||
153 | * @return string |
||
154 | */ |
||
155 | public function getDescription() |
||
159 | |||
160 | /** |
||
161 | * @param string $type |
||
162 | * |
||
163 | * @return $this |
||
164 | */ |
||
165 | public function setType($type) |
||
171 | |||
172 | /** |
||
173 | * @return string |
||
174 | */ |
||
175 | public function getType() |
||
179 | |||
180 | /** |
||
181 | * @param string $unit |
||
182 | * |
||
183 | * @return $this |
||
184 | */ |
||
185 | public function setUnit($unit) |
||
191 | |||
192 | /** |
||
193 | * @return string |
||
194 | */ |
||
195 | public function getUnit() |
||
199 | |||
200 | /** |
||
201 | * @param boolean $required |
||
202 | * |
||
203 | * @return $this |
||
204 | */ |
||
205 | public function setRequired($required) |
||
211 | |||
212 | /** |
||
213 | * @return boolean |
||
214 | */ |
||
215 | public function getRequired() |
||
219 | |||
220 | /** |
||
221 | * @param integer $orderIndex |
||
222 | * |
||
223 | * @return $this |
||
224 | */ |
||
225 | public function setOrderIndex($orderIndex) |
||
231 | |||
232 | /** |
||
233 | * @return integer |
||
234 | */ |
||
235 | public function getOrderIndex() |
||
239 | |||
240 | /** |
||
241 | * @param Schema $schema |
||
242 | * |
||
243 | * @return $this |
||
244 | */ |
||
245 | public function setSchema(Schema $schema = null) |
||
251 | |||
252 | /** |
||
253 | * Get schema |
||
254 | * |
||
255 | * @return Schema |
||
256 | */ |
||
257 | public function getSchema() |
||
261 | |||
262 | /** |
||
263 | * @param Option $option |
||
264 | * |
||
265 | * @return $this |
||
266 | */ |
||
267 | public function addOption(Option $option) |
||
274 | |||
275 | /** |
||
276 | * @param Option $options |
||
277 | */ |
||
278 | public function removeOption(Option $options) |
||
282 | |||
283 | /** |
||
284 | * @return ArrayCollection |
||
285 | */ |
||
286 | public function getOptions() |
||
290 | |||
291 | /** |
||
292 | * @param Attribute $attributes |
||
293 | * |
||
294 | * @return $this |
||
295 | */ |
||
296 | public function addAttribute(Attribute $attributes) |
||
302 | |||
303 | /** |
||
304 | * @param Attribute $attributes |
||
305 | */ |
||
306 | public function removeAttribute(Attribute $attributes) |
||
310 | |||
311 | /** |
||
312 | * @return ArrayCollection |
||
313 | */ |
||
314 | public function getAttributes() |
||
318 | } |
||
319 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..