1 | <?php |
||
27 | class OrderItemsTaxesApplicator implements OrderTaxesApplicatorInterface |
||
28 | { |
||
29 | /** |
||
30 | * @var CalculatorInterface |
||
31 | */ |
||
32 | private $calculator; |
||
33 | |||
34 | /** |
||
35 | * @var AdjustmentFactoryInterface |
||
36 | */ |
||
37 | private $adjustmentFactory; |
||
38 | |||
39 | /** |
||
40 | * @var IntegerDistributorInterface |
||
41 | */ |
||
42 | private $distributor; |
||
43 | |||
44 | /** |
||
45 | * @var TaxRateResolverInterface |
||
46 | */ |
||
47 | private $taxRateResolver; |
||
48 | |||
49 | /** |
||
50 | * @param CalculatorInterface $calculator |
||
51 | * @param AdjustmentFactoryInterface $adjustmentFactory |
||
52 | * @param IntegerDistributorInterface $distributor |
||
53 | * @param TaxRateResolverInterface $taxRateResolver |
||
54 | */ |
||
55 | public function __construct(CalculatorInterface $calculator, AdjustmentFactoryInterface $adjustmentFactory, IntegerDistributorInterface $distributor, TaxRateResolverInterface $taxRateResolver) |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | public function apply(OrderInterface $order, ZoneInterface $zone) |
||
94 | |||
95 | /** |
||
96 | * @param OrderItemUnitInterface $unit |
||
97 | * @param int $taxAmount |
||
98 | * @param string $label |
||
99 | * @param bool $included |
||
100 | */ |
||
101 | private function addAdjustment(OrderItemUnitInterface $unit, $taxAmount, $label, $included) |
||
106 | } |
||
107 |