| 1 | <?php |
||
| 18 | final class Item implements CreatableFromArray, ContainsMetadata |
||
| 19 | { |
||
| 20 | use MetadataTrait; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | private $id; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var \DateTimeImmutable |
||
| 29 | */ |
||
| 30 | private $createdAt; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var Plan |
||
| 34 | */ |
||
| 35 | private $plan; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var int |
||
| 39 | */ |
||
| 40 | private $quantity; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @var string |
||
| 44 | */ |
||
| 45 | private $subscription; |
||
| 46 | |||
| 47 | 7 | public static function createFromArray(array $data): self |
|
| 59 | |||
| 60 | 1 | public function getId(): string |
|
| 64 | |||
| 65 | 1 | public function getCreatedAt(): \DateTimeImmutable |
|
| 69 | |||
| 70 | public function getPlan(): Plan |
||
| 74 | |||
| 75 | 1 | public function getQuantity(): int |
|
| 79 | |||
| 80 | 1 | public function getSubscription(): string |
|
| 84 | } |
||
| 85 |
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..