| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | protected function aggregateQuantity(BillInterface $first, BillInterface $other): QuantityInterface |
||
| 30 | 1 | { |
|
| 31 | $billType = $first->getType(); |
||
| 32 | 1 | ||
| 33 | if ($this->typeSemantics->isMonthly($billType)) { |
||
| 34 | 1 | return $first->getQuantity(); |
|
| 35 | 1 | } |
|
| 36 | |||
| 37 | 1 | return $first->getQuantity()->add($other->getQuantity()); |
|
| 38 | } |
||
| 40 |