Conditions | 2 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function create(AdjustmentInterface $adjustment, ?AdjustmentView $additionalAmount): AdjustmentView |
||
21 | { |
||
22 | $adjustmentView = new AdjustmentView(); |
||
23 | |||
24 | $adjustmentView->name = $adjustment->getLabel(); |
||
25 | $adjustmentView->amount = $this->priceViewFactory->create( |
||
26 | $additionalAmount ? $adjustment->getAmount() + $additionalAmount->amount->current : $adjustment->getAmount() |
||
27 | ); |
||
28 | |||
29 | return $adjustmentView; |
||
30 | } |
||
31 | } |
||
32 |