| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.1406 |
| Changes | 0 | ||
| 1 | <?php |
||
| 76 | 1 | public function calculateSum(QuantityInterface $quantity) |
|
| 77 | { |
||
| 78 | 1 | $usage = $this->calculateUsage($quantity); |
|
| 79 | 1 | if ($usage === null) { |
|
| 80 | return null; |
||
| 81 | } |
||
| 82 | |||
| 83 | 1 | $price = $this->calculatePrice($quantity); |
|
| 84 | 1 | if ($price === null) { |
|
| 85 | return null; |
||
| 86 | } |
||
| 87 | |||
| 88 | 1 | return $price->multiply($usage->getQuantity()); |
|
| 89 | } |
||
| 90 | |||
| 115 |
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..