1 | <?php |
||
15 | final class Discount implements CreatableFromArray |
||
16 | { |
||
17 | /** |
||
18 | * @var Coupon |
||
19 | */ |
||
20 | private $coupon; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $customer; |
||
26 | |||
27 | /** |
||
28 | * @var ?\DateTimeImmutable |
||
29 | */ |
||
30 | private $endAt; |
||
31 | |||
32 | /** |
||
33 | * @var \DateTimeImmutable |
||
34 | */ |
||
35 | private $startAt; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | private $subscription; |
||
41 | |||
42 | 3 | public static function createFromArray(array $data): self |
|
53 | |||
54 | public function getCoupon(): Coupon |
||
58 | |||
59 | public function getCustomer(): string |
||
63 | |||
64 | public function getEndAt(): ?\DateTimeImmutable |
||
68 | |||
69 | public function getStartAt(): \DateTimeImmutable |
||
73 | |||
74 | public function getSubscription(): string |
||
78 | } |
||
79 |
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..