1 | <?php |
||
23 | abstract class AbstractPrice implements PriceInterface, EntityInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var integer |
||
27 | */ |
||
28 | protected $id; |
||
29 | |||
30 | /** |
||
31 | * @var Target |
||
32 | */ |
||
33 | protected $target; |
||
34 | |||
35 | /** |
||
36 | * @var Type |
||
37 | */ |
||
38 | protected $type; |
||
39 | |||
40 | public function __construct($id, TargetInterface $target, TypeInterface $type) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function getTarget() |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function getType() |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | * Default sum calculation method: sum = price * usage. |
||
66 | */ |
||
67 | public function calculateSum(QuantityInterface $quantity) |
||
81 | |||
82 | public static function create(array $data) |
||
86 | |||
87 | public function jsonSerialize() |
||
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | abstract public function calculateUsage(QuantityInterface $quantity); |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | abstract public function calculatePrice(QuantityInterface $action); |
||
105 | } |
||
106 |
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..