Completed
Pull Request — master (#11)
by Volodymyr
15:23
created
Business/Translator/TranslatorFunction/MeasureUnitToInt.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     public function translate($value, array $payload)
25 25
     {
26 26
         if (is_array($value[0][static::KEY_DATA]) && array_key_exists(static::KEY_AMOUNT, $value[0][static::KEY_DATA])) {
27
-            $value[0][static::KEY_DATA] = (int)$value[0][static::KEY_DATA][static::KEY_AMOUNT];
27
+            $value[0][static::KEY_DATA] = (int) $value[0][static::KEY_DATA][static::KEY_AMOUNT];
28 28
         }
29 29
 
30 30
         return $value;
Please login to merge, or discard this patch.
Business/Translator/TranslatorFunction/PriceSelector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
             foreach ($priceInfo[static::KEY_DATA] as $price) {
65 65
                 if ($price[static::KEY_CURRENCY] === $currency) {
66 66
                     $result[] = [
67
-                        static::KEY_PRICE => (int)((float)$price[static::KEY_AMOUNT]) * 100,
67
+                        static::KEY_PRICE => (int) ((float) $price[static::KEY_AMOUNT]) * 100,
68 68
                         static::KEY_PRICE_TYPE => $type,
69 69
                         static::KEY_CURRENCY => $price[static::KEY_CURRENCY],
70 70
                         static::KEY_STORE => $store,
Please login to merge, or discard this patch.
Business/Translator/TranslatorFunction/LabelsToLocalizedAttributeNames.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     public function translate($value, array $payload)
24 24
     {
25 25
         $key = isset($this->options['key']) ? $this->options['key'] : static::KEY_NAME;
26
-        return array_map(function ($value) use ($key) {
26
+        return array_map(function($value) use ($key) {
27 27
             return [
28 28
                 $key => $value,
29 29
             ];
Please login to merge, or discard this patch.
Business/Translator/TranslatorFunction/AddAbstractSkuIfNotExist.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $value[static::KEY_ABSTRACT_SKU] = $payload[static::KEY_PARENT];
38 38
         $value[static::ABSTRACT_IDENTIFIER] = false;
39 39
 
40
-         return $value;
40
+            return $value;
41 41
     }
42 42
 
43 43
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,6 +47,6 @@
 block discarded – undo
47 47
      */
48 48
     protected function createAbstractSKU(string $sku): string
49 49
     {
50
-        return $sku . '_abstract';
50
+        return $sku.'_abstract';
51 51
     }
52 52
 }
Please login to merge, or discard this patch.
Business/Translator/TranslatorFunction/DefaultPriceSelector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 foreach ($priceInfo[static::KEY_DATA] as $price) {
68 68
                     foreach ($this->getStores() as $store) {
69 69
                         $result[] = [
70
-                            static::KEY_PRICE => (int)((float)$price[static::KEY_AMOUNT]) * 100,
70
+                            static::KEY_PRICE => (int) ((float) $price[static::KEY_AMOUNT]) * 100,
71 71
                             static::KEY_PRICE_TYPE => static::DEFAULT_PRICE_TYPE,
72 72
                             static::KEY_CURRENCY => $price[static::KEY_CURRENCY],
73 73
                             static::KEY_STORE => $store,
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             foreach ($priceInfo[static::KEY_DATA] as $price) {
88 88
                 if ($price[static::KEY_CURRENCY] === $currency) {
89 89
                     $result[] = [
90
-                        static::KEY_PRICE => (int)((float)$price[static::KEY_AMOUNT]) * 100,
90
+                        static::KEY_PRICE => (int) ((float) $price[static::KEY_AMOUNT]) * 100,
91 91
                         static::KEY_PRICE_TYPE => $type,
92 92
                         static::KEY_CURRENCY => $price[static::KEY_CURRENCY],
93 93
                         static::KEY_STORE => $store,
Please login to merge, or discard this patch.
Business/Translator/Generator/UrlGeneratorStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     public function generate(string $name, int $idLocale, string $identifier): string
43 43
     {
44 44
         $abstractProductUrl = $this->utilTextService->generateSlug($name);
45
-        $abstractProductUrl = '/' . substr($this->getLocaleNameById($idLocale), 0, 2) . '/' . $abstractProductUrl . '-' . md5($identifier);
45
+        $abstractProductUrl = '/'.substr($this->getLocaleNameById($idLocale), 0, 2).'/'.$abstractProductUrl.'-'.md5($identifier);
46 46
         $this->cleanupRedirectUrls($abstractProductUrl);
47 47
 
48 48
         return $abstractProductUrl;
Please login to merge, or discard this patch.
Business/Translator/Dictionary/DefaultProductImportDictionary.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     {
43 43
         return [
44 44
             'values.*' => 'MeasureUnitToInt',
45
-            'values.collection.data' => function ($value) {
45
+            'values.collection.data' => function($value) {
46 46
                 if (is_array($value)) {
47 47
                     return reset($value);
48 48
                 }
Please login to merge, or discard this patch.
Business/Translator/Dictionary/DefaultCategoryImportDictionary.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,10 +53,10 @@
 block discarded – undo
53 53
                     ],
54 54
                 ],
55 55
             ],
56
-            'fk_category_template' => function ($value, $payload) {
56
+            'fk_category_template' => function($value, $payload) {
57 57
                 return $this->config->getDefaultFkCategoryTemplate();
58 58
             },
59
-            'parent_category_key' => function ($value) {
59
+            'parent_category_key' => function($value) {
60 60
                 if (empty($value)) {
61 61
                     return 'demoshop';
62 62
                 }
Please login to merge, or discard this patch.
Business/Translator/Dictionary/DefaultProductModelImportDictionary.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
                 ],
51 51
             ],
52 52
             'values.*' => 'MeasureUnitToInt',
53
-            'values.collection.data' => function ($value) {
53
+            'values.collection.data' => function($value) {
54 54
                 if (is_array($value)) {
55 55
                     return reset($value);
56 56
                 }
Please login to merge, or discard this patch.