1 | <?php |
||
20 | final class LineItem implements CreatableFromArray, ContainsMetadata |
||
21 | { |
||
22 | use LivemodeTrait, MetadataTrait; |
||
23 | |||
24 | const TYPE_INVOICE_ITEM = 'invoiceitem'; |
||
25 | const TYPE_SUBSCRIPTION = 'subscription'; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $id; |
||
31 | |||
32 | /** |
||
33 | * @var Money |
||
34 | */ |
||
35 | private $amount; |
||
36 | |||
37 | /** |
||
38 | * @var Currency |
||
39 | */ |
||
40 | private $currency; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | private $description; |
||
46 | |||
47 | /** |
||
48 | * @var bool |
||
49 | */ |
||
50 | private $discountable; |
||
51 | |||
52 | /** |
||
53 | * @var ?string |
||
54 | */ |
||
55 | private $hydraId; |
||
56 | |||
57 | /** |
||
58 | * @var ?string |
||
59 | */ |
||
60 | private $invoiceItem; |
||
61 | |||
62 | /** |
||
63 | * @var Period |
||
64 | */ |
||
65 | private $period; |
||
66 | |||
67 | /** |
||
68 | * @var ?string |
||
69 | */ |
||
70 | private $plan; |
||
71 | |||
72 | /** |
||
73 | * @var bool |
||
74 | */ |
||
75 | private $proration; |
||
76 | |||
77 | /** |
||
78 | * @var int |
||
79 | */ |
||
80 | private $quantity; |
||
81 | |||
82 | /** |
||
83 | * @var ?string |
||
84 | */ |
||
85 | private $subscription; |
||
86 | |||
87 | /** |
||
88 | * @var ?string |
||
89 | */ |
||
90 | private $subscriptionItem; |
||
91 | |||
92 | /** |
||
93 | * @var ?string |
||
94 | */ |
||
95 | private $type; |
||
96 | |||
97 | 15 | public static function createFromArray(array $data): self |
|
121 | |||
122 | 1 | public function getId(): string |
|
126 | |||
127 | 1 | public function getAmount(): Money |
|
131 | |||
132 | 1 | public function getCurrency(): Currency |
|
136 | |||
137 | 1 | public function getDescription() |
|
141 | |||
142 | 1 | public function isDiscountable(): bool |
|
146 | |||
147 | 1 | public function getHydraId(): ?string |
|
151 | |||
152 | 1 | public function getInvoiceItem(): ?string |
|
156 | |||
157 | 1 | public function getPeriod(): Period |
|
161 | |||
162 | 1 | public function getPlan(): ?string |
|
166 | |||
167 | 1 | public function isProration(): bool |
|
171 | |||
172 | 1 | public function getQuantity(): int |
|
176 | |||
177 | 1 | public function getSubscription(): ?string |
|
181 | |||
182 | 1 | public function getSubscriptionItem(): ?string |
|
186 | |||
187 | 1 | public function getType(): ?string |
|
191 | } |
||
192 |
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..