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