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