1 | <?php |
||
23 | class Subscription implements Translatable, PriceableInterface |
||
24 | { |
||
25 | /** |
||
26 | * @ORM\Id() |
||
27 | * @ORM\GeneratedValue(strategy="AUTO") |
||
28 | * @ORM\Column(type="integer", name="id") |
||
29 | * |
||
30 | * @var int |
||
31 | */ |
||
32 | protected $id; |
||
33 | |||
34 | /** |
||
35 | * @Gedmo\Translatable |
||
36 | * @ORM\Column(type="string", name="name") |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $name; |
||
41 | |||
42 | /** |
||
43 | * @ORM\OneToMany(targetEntity="SubscriptionSpecification", mappedBy="subscription") |
||
44 | * |
||
45 | * @var array |
||
46 | */ |
||
47 | protected $specification; |
||
48 | |||
49 | /** |
||
50 | * @ORM\Column(type="text", name="type") |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $type; |
||
55 | |||
56 | /** |
||
57 | * @ORM\OneToMany(targetEntity="Duration", mappedBy="subscription", cascade={"persist", "remove"}) |
||
58 | * |
||
59 | * @var Doctrine\Common\Collections\ArrayCollection |
||
60 | */ |
||
61 | protected $ranges; |
||
62 | |||
63 | /** |
||
64 | * @PaywallValidators\ContainsDecimal(entity="Subscription", property="price") |
||
65 | * @ORM\Column(type="decimal", name="price", precision=10, scale=2) |
||
66 | * |
||
67 | * @var decimal |
||
68 | */ |
||
69 | protected $price; |
||
70 | |||
71 | /** |
||
72 | * @ORM\Column(type="string", name="currency") |
||
73 | * |
||
74 | * @var string |
||
75 | */ |
||
76 | protected $currency; |
||
77 | |||
78 | /** |
||
79 | * @Gedmo\Translatable |
||
80 | * @ORM\Column(type="text", name="description", nullable=true) |
||
81 | * |
||
82 | * @var text |
||
83 | */ |
||
84 | protected $description; |
||
85 | |||
86 | /** |
||
87 | * @ORM\Column(type="datetime", name="created_at") |
||
88 | * |
||
89 | * @var string |
||
90 | */ |
||
91 | protected $created_at; |
||
92 | |||
93 | /** |
||
94 | * @ORM\Column(type="boolean", name="is_active") |
||
95 | * |
||
96 | * @var bool |
||
97 | */ |
||
98 | protected $is_active; |
||
99 | |||
100 | /** |
||
101 | * @ORM\Column(type="boolean", name="is_default", nullable=true) |
||
102 | * |
||
103 | * @var bool |
||
104 | */ |
||
105 | protected $is_default; |
||
106 | |||
107 | /** |
||
108 | * @ORM\OneToMany( |
||
109 | * targetEntity="SubscriptionTranslation", |
||
110 | * mappedBy="object", |
||
111 | * cascade={"persist", "remove"} |
||
112 | * ) |
||
113 | */ |
||
114 | protected $translations; |
||
115 | |||
116 | /** |
||
117 | * @Gedmo\Locale |
||
118 | * Used locale to override Translation listener`s locale |
||
119 | * this is not a mapped field of entity metadata, just a simple property |
||
120 | */ |
||
121 | public $locale; |
||
122 | |||
123 | /** |
||
124 | * @ORM\Column(type="boolean", name="is_template", nullable=true) |
||
125 | * |
||
126 | * @var bool |
||
127 | */ |
||
128 | protected $isTemplate; |
||
129 | |||
130 | public function __construct() |
||
139 | |||
140 | /** |
||
141 | * Get subscription id. |
||
142 | * |
||
143 | * @return int |
||
144 | */ |
||
145 | public function getId() |
||
149 | |||
150 | /** |
||
151 | * Get subscription name. |
||
152 | * |
||
153 | * @return string |
||
154 | */ |
||
155 | public function getName() |
||
159 | |||
160 | /** |
||
161 | * Set subscription name. |
||
162 | * |
||
163 | * @param string $name |
||
164 | * |
||
165 | * @return string |
||
166 | */ |
||
167 | public function setName($name) |
||
173 | |||
174 | /** |
||
175 | * Get specification. |
||
176 | * |
||
177 | * @return array |
||
178 | */ |
||
179 | public function getSpecification() |
||
183 | |||
184 | /** |
||
185 | * Get subscription type. |
||
186 | * |
||
187 | * @return int |
||
188 | */ |
||
189 | public function getType() |
||
193 | |||
194 | /** |
||
195 | * Set subscription type. |
||
196 | * |
||
197 | * @param int $type |
||
198 | * |
||
199 | * @return int |
||
200 | */ |
||
201 | public function setType($type) |
||
207 | |||
208 | /** |
||
209 | * Get subscription price. |
||
210 | * |
||
211 | * @return decimal |
||
212 | */ |
||
213 | public function getPrice() |
||
217 | |||
218 | /** |
||
219 | * Set subscription price. |
||
220 | * |
||
221 | * @param decimal $price |
||
222 | * |
||
223 | * @return decimal |
||
224 | */ |
||
225 | public function setPrice($price) |
||
231 | |||
232 | /** |
||
233 | * Get subscription currency. |
||
234 | * |
||
235 | * @return string |
||
236 | */ |
||
237 | public function getCurrency() |
||
241 | |||
242 | /** |
||
243 | * Set subscription currency. |
||
244 | * |
||
245 | * @param string $currency |
||
246 | * |
||
247 | * @return string |
||
248 | */ |
||
249 | public function setCurrency($currency) |
||
255 | |||
256 | /** |
||
257 | * Get subscription description. |
||
258 | * |
||
259 | * @return text |
||
260 | */ |
||
261 | public function getDescription() |
||
265 | |||
266 | /** |
||
267 | * Set subscription description. |
||
268 | * |
||
269 | * @param text $description |
||
270 | * |
||
271 | * @return text |
||
272 | */ |
||
273 | public function setDescription($description) |
||
279 | |||
280 | /** |
||
281 | * Get subscription status. |
||
282 | * |
||
283 | * @return bool |
||
284 | */ |
||
285 | public function getIsActive() |
||
289 | |||
290 | /** |
||
291 | * Set subscription status. |
||
292 | * |
||
293 | * @param bool $is_active |
||
294 | * |
||
295 | * @return bool |
||
296 | */ |
||
297 | public function setIsActive($is_active) |
||
303 | |||
304 | /** |
||
305 | * Get subscription create date. |
||
306 | * |
||
307 | * @return datetime |
||
308 | */ |
||
309 | public function getCreatedAt() |
||
313 | |||
314 | /** |
||
315 | * Set subscription create date. |
||
316 | * |
||
317 | * @param datetime $created_at |
||
318 | * |
||
319 | * @return datetime |
||
320 | */ |
||
321 | public function setCreatedAt(\DateTime $created_at) |
||
327 | |||
328 | /** |
||
329 | * Get default. |
||
330 | * |
||
331 | * @return bool |
||
332 | */ |
||
333 | public function getIsDefault() |
||
337 | |||
338 | /** |
||
339 | * Set is_default. |
||
340 | * |
||
341 | * @param bool $is_default |
||
342 | * |
||
343 | * @return bool |
||
344 | */ |
||
345 | public function setIsDefault($is_default) |
||
351 | |||
352 | /** |
||
353 | * Gets the value of ranges. |
||
354 | * |
||
355 | * @return Doctrine\Common\Collections\ArrayCollection |
||
356 | */ |
||
357 | public function getRanges() |
||
361 | |||
362 | /** |
||
363 | * Sets the value of ranges. |
||
364 | * |
||
365 | * @param Doctrine\Common\Collections\ArrayCollection $ranges the ranges |
||
366 | * |
||
367 | * @return self |
||
368 | */ |
||
369 | public function setRanges(\Doctrine\Common\Collections\ArrayCollection $ranges) |
||
375 | |||
376 | /** |
||
377 | * Adds Subscription duration. |
||
378 | * |
||
379 | * @param Duration $duration Duration to add |
||
380 | * |
||
381 | * @return Duration |
||
382 | */ |
||
383 | public function addRange(Duration $duration) |
||
389 | |||
390 | public function getObject() |
||
394 | |||
395 | public function getContextCurrency() |
||
399 | |||
400 | public function setTranslatableLocale($locale) |
||
404 | |||
405 | public function getTranslations() |
||
409 | |||
410 | public function addTranslation(SubscriptionTranslation $translation) |
||
417 | |||
418 | /** |
||
419 | * Gets the value of isTemplate. |
||
420 | * |
||
421 | * @return bool |
||
422 | */ |
||
423 | public function isTemplate() |
||
427 | |||
428 | /** |
||
429 | * Sets the value of isTemplate. |
||
430 | * |
||
431 | * @param bool $isTemplate the is template |
||
432 | */ |
||
433 | public function setIsTemplate($isTemplate) |
||
437 | } |
||
438 |
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..