Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.1406 |
Changes | 0 |
1 | <?php |
||
68 | 1 | public function calculateSum(QuantityInterface $quantity) |
|
69 | { |
||
70 | 1 | $usage = $this->calculateUsage($quantity); |
|
71 | 1 | if ($usage === null) { |
|
72 | return null; |
||
73 | } |
||
74 | |||
75 | 1 | $price = $this->calculatePrice($quantity); |
|
76 | 1 | if ($price === null) { |
|
77 | return null; |
||
78 | } |
||
79 | |||
80 | 1 | return $price->multiply($usage->getQuantity()); |
|
81 | } |
||
82 | |||
107 |
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..