@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $item = $menu; |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - $item->addChild('avatax', ['route' => 'odiseo_sylius_avatax_plugin_admin_avatax_configuration_index']) |
|
| 25 | + $item->addChild('avatax', [ 'route' => 'odiseo_sylius_avatax_plugin_admin_avatax_configuration_index' ]) |
|
| 26 | 26 | ->setLabel('odiseo_sylius_avatax_plugin.menu.admin.avatax') |
| 27 | 27 | ->setLabelAttribute('icon', 'cog') |
| 28 | 28 | ; |
@@ -87,11 +87,11 @@ discard block |
||
| 87 | 87 | if ('shipping' === $line->itemCode) { |
| 88 | 88 | /** @var AdjustmentInterface $shippingTaxAdjustment */ |
| 89 | 89 | $shippingTaxAdjustment = $this->adjustmentFactory |
| 90 | - ->createWithData(AdjustmentInterface::TAX_ADJUSTMENT, 'shipping_tax', intval($line->taxCalculated*100), false) |
|
| 90 | + ->createWithData(AdjustmentInterface::TAX_ADJUSTMENT, 'shipping_tax', intval($line->taxCalculated * 100), false) |
|
| 91 | 91 | ; |
| 92 | 92 | $order->addAdjustment($shippingTaxAdjustment); |
| 93 | 93 | } else { |
| 94 | - $matchItems = $order->getItems()->filter(function (OrderItemInterface $item) use ($line): bool { |
|
| 94 | + $matchItems = $order->getItems()->filter(function(OrderItemInterface $item) use ($line): bool { |
|
| 95 | 95 | /** @var ProductVariantInterface $variant */ |
| 96 | 96 | $variant = $item->getVariant(); |
| 97 | 97 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | foreach ($matchItem->getUnits() as $unit) { |
| 106 | 106 | $unitTaxAdjustment = $this->adjustmentFactory |
| 107 | - ->createWithData(AdjustmentInterface::TAX_ADJUSTMENT, 'item_tax', intval($line->taxCalculated*100), false); |
|
| 107 | + ->createWithData(AdjustmentInterface::TAX_ADJUSTMENT, 'item_tax', intval($line->taxCalculated * 100), false); |
|
| 108 | 108 | |
| 109 | 109 | $unit->addAdjustment($unitTaxAdjustment); |
| 110 | 110 | } |
@@ -210,12 +210,12 @@ discard block |
||
| 210 | 210 | private function matchTaxZone(OrderInterface $order): bool |
| 211 | 211 | { |
| 212 | 212 | $billingAddress = $order->getBillingAddress(); |
| 213 | - $zones = []; |
|
| 213 | + $zones = [ ]; |
|
| 214 | 214 | |
| 215 | 215 | if (null !== $billingAddress) { |
| 216 | 216 | $zones = $this->zoneMatcher->matchAll($billingAddress, Scope::TAX); |
| 217 | 217 | } else { |
| 218 | - $zones[] = $this->defaultTaxZoneProvider->getZone($order); |
|
| 218 | + $zones[ ] = $this->defaultTaxZoneProvider->getZone($order); |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | if (count($zones) === 0) { |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function load(array $config, ContainerBuilder $container): void |
| 19 | 19 | { |
| 20 | - $this->processConfiguration($this->getConfiguration([], $container), $config); |
|
| 20 | + $this->processConfiguration($this->getConfiguration([ ], $container), $config); |
|
| 21 | 21 | |
| 22 | 22 | $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
| 23 | 23 | |
@@ -27,6 +27,6 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public static function getExtendedTypes(): iterable |
| 29 | 29 | { |
| 30 | - return [ProductType::class]; |
|
| 30 | + return [ ProductType::class ]; |
|
| 31 | 31 | } |
| 32 | 32 | } |