Completed
Push — master ( a51a2e...ff2d81 )
by G
03:53
created
src/Services/OrderDepositTaxesApplicator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
                     continue;
75 75
                 }
76 76
 
77
-                $this->addTaxAdjustment($unit, (int)$taxAmount, $taxRate->getLabel(), $taxRate->isIncludedInPrice());
77
+                $this->addTaxAdjustment($unit, (int) $taxAmount, $taxRate->getLabel(), $taxRate->isIncludedInPrice());
78 78
             }
79 79
         }
80 80
     }
Please login to merge, or discard this patch.
src/Form/Extension/ProductVariantTypeExtension.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
     public function buildForm(FormBuilderInterface $builder, array $options): void
28 28
     {
29 29
         $builder->add('depositTaxCategory', TaxCategoryChoiceType::class, [
30
-          'required' => false,
31
-          'placeholder' => '---',
32
-          'label' => 'gweb_deposit.admin.product_variant.tax_category',
30
+            'required' => false,
31
+            'placeholder' => '---',
32
+            'label' => 'gweb_deposit.admin.product_variant.tax_category',
33 33
         ]);
34 34
 
35 35
         $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event): void {
@@ -39,18 +39,18 @@  discard block
 block discarded – undo
39 39
             'channelDeposits',
40 40
             ChannelCollectionType::class,
41 41
             [
42
-              'entry_type' => ChannelDepositType::class,
43
-              'entry_options' => function (ChannelInterface $channel) use ($productVariant) {
44
-                  return [
42
+                'entry_type' => ChannelDepositType::class,
43
+                'entry_options' => function (ChannelInterface $channel) use ($productVariant) {
44
+                    return [
45 45
                     'channel' => $channel,
46 46
                     'product_variant' => $productVariant,
47 47
                     'required' => false,
48
-                  ];
49
-              },
50
-              'label' => 'gweb_deposit.admin.product_variant.price',
48
+                    ];
49
+                },
50
+                'label' => 'gweb_deposit.admin.product_variant.price',
51 51
             ]
52 52
             );
53
-          }
53
+            }
54 54
         );
55 55
     }
56 56
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
           'label' => 'gweb_deposit.admin.product_variant.tax_category',
33 33
         ]);
34 34
 
35
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event): void {
35
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event): void {
36 36
             $productVariant = $event->getData();
37 37
 
38 38
             $event->getForm()->add(
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             ChannelCollectionType::class,
41 41
             [
42 42
               'entry_type' => ChannelDepositType::class,
43
-              'entry_options' => function (ChannelInterface $channel) use ($productVariant) {
43
+              'entry_options' => function(ChannelInterface $channel) use ($productVariant) {
44 44
                   return [
45 45
                     'channel' => $channel,
46 46
                     'product_variant' => $productVariant,
Please login to merge, or discard this patch.
src/Menu/AdminProductVariantFormMenuListener.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
         $menu = $event->getMenu();
30 30
 
31 31
         $menu->addChild('deposit', ['position' => 1])
32
-          ->setAttribute(
32
+            ->setAttribute(
33 33
             'template',
34 34
             '@GwebSyliusProductDepositPlugin/Resources/views/Admin/ProductVariant/Tab/_deposit.html.twig'
35
-          )
36
-          ->setLabel($this->translator->trans('gweb_deposit.admin.product_variant.menu'))
37
-          ->setLabelAttribute('icon', 'dollar');
35
+            )
36
+            ->setLabel($this->translator->trans('gweb_deposit.admin.product_variant.menu'))
37
+            ->setLabelAttribute('icon', 'dollar');
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
src/Form/ChannelDepositType.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -28,30 +28,30 @@  discard block
 block discarded – undo
28 28
     public function buildForm(FormBuilderInterface $builder, array $options): void
29 29
     {
30 30
         $builder->add(
31
-          'price',
32
-          MoneyType::class,
33
-          [
31
+            'price',
32
+            MoneyType::class,
33
+            [
34 34
             'label' => 'gweb_deposit.admin.product_variant.price',
35 35
             'required' => false,
36 36
             'currency' => $options['channel']->getBaseCurrency()->getCode(),
37
-          ]
37
+            ]
38 38
         );
39 39
 
40 40
         $builder->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) use ($options): void {
41
-              /** @var ChannelDepositInterface $channelDeposit */
42
-              $channelDeposit = $event->getData();
41
+                /** @var ChannelDepositInterface $channelDeposit */
42
+                $channelDeposit = $event->getData();
43 43
 
44
-              if (!$channelDeposit instanceof $this->dataClass) {
45
-                  $event->setData(null);
44
+                if (!$channelDeposit instanceof $this->dataClass) {
45
+                    $event->setData(null);
46 46
 
47
-                  return;
48
-              }
47
+                    return;
48
+                }
49 49
 
50
-              $channelDeposit->setChannelCode($options['channel']->getCode());
51
-              $channelDeposit->setProductVariant($options['product_variant']);
50
+                $channelDeposit->setChannelCode($options['channel']->getCode());
51
+                $channelDeposit->setProductVariant($options['product_variant']);
52 52
 
53
-              $event->setData($channelDeposit);
54
-          }
53
+                $event->setData($channelDeposit);
54
+            }
55 55
         );
56 56
     }
57 57
 
@@ -63,17 +63,17 @@  discard block
 block discarded – undo
63 63
         parent::configureOptions($resolver);
64 64
 
65 65
         $resolver
66
-          ->setRequired('channel')
67
-          ->setAllowedTypes('channel', [ChannelInterface::class])
68
-          ->setDefined('product_variant')
69
-          ->setAllowedTypes('product_variant', ['null', ProductVariantInterface::class])
70
-          ->setDefaults(
66
+            ->setRequired('channel')
67
+            ->setAllowedTypes('channel', [ChannelInterface::class])
68
+            ->setDefined('product_variant')
69
+            ->setAllowedTypes('product_variant', ['null', ProductVariantInterface::class])
70
+            ->setDefaults(
71 71
             [
72
-              'label' => function (Options $options): string {
73
-                  return $options['channel']->getName();
74
-              },
72
+                'label' => function (Options $options): string {
73
+                    return $options['channel']->getName();
74
+                },
75 75
             ]
76
-          );
76
+            );
77 77
     }
78 78
 
79 79
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
           ]
38 38
         );
39 39
 
40
-        $builder->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) use ($options): void {
40
+        $builder->addEventListener(FormEvents::SUBMIT, function(FormEvent $event) use ($options): void {
41 41
               /** @var ChannelDepositInterface $channelDeposit */
42 42
               $channelDeposit = $event->getData();
43 43
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
           ->setAllowedTypes('product_variant', ['null', ProductVariantInterface::class])
70 70
           ->setDefaults(
71 71
             [
72
-              'label' => function (Options $options): string {
72
+              'label' => function(Options $options): string {
73 73
                   return $options['channel']->getName();
74 74
               },
75 75
             ]
Please login to merge, or discard this patch.