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