1 | <?php |
||
26 | class SinglePrice extends AbstractPrice |
||
27 | { |
||
28 | /** |
||
29 | * @var Quantity prepaid quantity also implies Unit |
||
30 | */ |
||
31 | protected $prepaid; |
||
32 | |||
33 | /** |
||
34 | * @var Money |
||
35 | */ |
||
36 | protected $price; |
||
37 | |||
38 | 3 | public function __construct( |
|
49 | |||
50 | /* |
||
51 | protected $properties = [ |
||
52 | 'id' => '', |
||
53 | 'target' => [AbstractTarget::class, 'create'], |
||
54 | 'type' => [Type::class, 'create'], |
||
55 | 'prepaid' => [Quantity::class, 'create'], |
||
56 | 'price' => [MoneyFactory::class, 'create'], |
||
57 | ]; |
||
58 | */ |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | 3 | public function calculateUsage(QuantityInterface $quantity) |
|
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | * Same price for any usage. |
||
73 | */ |
||
74 | 1 | public function calculatePrice(QuantityInterface $usage) |
|
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..