Passed
Pull Request — master (#11)
by Volodymyr
16:03
created
Business/Translator/Dictionary/CategoryImportDictionary.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 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 59
         ];
Please login to merge, or discard this patch.
AkeneoPimMiddlewareConnector/Business/Mapper/Map/ProductModelImportMap.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,16 +32,16 @@  discard block
 block discarded – undo
32 32
     public function getMap(): array
33 33
     {
34 34
         return [
35
-            'taxSetName' => function ($item) {
35
+            'taxSetName' => function($item) {
36 36
                 return $this->config->getDefaultTaxSet();
37 37
             },
38
-            'new_from' => function ($item) {
38
+            'new_from' => function($item) {
39 39
                 return null;
40 40
             },
41
-            'new_to' => function ($item) {
41
+            'new_to' => function($item) {
42 42
                 return null;
43 43
             },
44
-            'category_product_order' => function ($item) {
44
+            'category_product_order' => function($item) {
45 45
                 return 0;
46 46
             },
47 47
             'abstract_sku' => 'code',
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
             'localizedAttributes' => [
55 55
                 'values.localizedAttributes',
56 56
             ],
57
-            'color_code' => function ($item) {
57
+            'color_code' => function($item) {
58 58
                 return '';
59 59
             },
60
-            'stores' => function ($item) {
60
+            'stores' => function($item) {
61 61
                 return $this->config->getDefaultStoresForProducts();
62 62
             },
63 63
         ];
Please login to merge, or discard this patch.
Zed/AkeneoPimMiddlewareConnector/Business/Mapper/Map/CategoryImportMap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@
 block discarded – undo
22 22
             'parent_category_key' => 'parent',
23 23
             'localizedAttributes' => 'labels',
24 24
             'locales' => 'labels',
25
-            'is_root' => function (array $item) {
25
+            'is_root' => function(array $item) {
26 26
                 return empty($item['parent']);
27 27
             },
28
-            'is_main' => function (array $item) {
28
+            'is_main' => function(array $item) {
29 29
                 return true;
30 30
             },
31
-            'fk_category_template' => function (array $item) {
31
+            'fk_category_template' => function(array $item) {
32 32
                 return null;
33 33
             },
34 34
         ];
Please login to merge, or discard this patch.
Business/Mapper/Map/AttributeMapPreparationMap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     public function getMap(): array
19 19
     {
20 20
         return [
21
-            'options' => function (array $value) {
21
+            'options' => function(array $value) {
22 22
                 return [
23 23
                     'code' => $value['code'],
24 24
                     'type' => $value['type'],
Please login to merge, or discard this patch.
Business/Mapper/Map/DefaultCategoryImportMap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@
 block discarded – undo
22 22
             'parent_category_key' => 'parent',
23 23
             'localizedAttributes' => 'labels',
24 24
             'locales' => 'labels',
25
-            'is_root' => function (array $item) {
25
+            'is_root' => function(array $item) {
26 26
                 return false;
27 27
             },
28
-            'is_main' => function (array $item) {
28
+            'is_main' => function(array $item) {
29 29
                 return true;
30 30
             },
31
-            'fk_category_template' => function (array $item) {
31
+            'fk_category_template' => function(array $item) {
32 32
                 return null;
33 33
             },
34 34
         ];
Please login to merge, or discard this patch.
Zed/AkeneoPimMiddlewareConnector/Business/Mapper/Map/ProductImportMap.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,29 +32,29 @@  discard block
 block discarded – undo
32 32
     public function getMap(): array
33 33
     {
34 34
         return [
35
-            'taxSetName' => function ($item) {
35
+            'taxSetName' => function($item) {
36 36
                 return $this->config->getDefaultTaxSet();
37 37
             },
38
-            'color_code' => function ($item) {
38
+            'color_code' => function($item) {
39 39
                 return '';
40 40
             },
41
-            'new_from' => function ($item) {
41
+            'new_from' => function($item) {
42 42
                 return null;
43 43
             },
44
-            'new_to' => function ($item) {
44
+            'new_to' => function($item) {
45 45
                 return null;
46 46
             },
47 47
             'category_key' => 'categories',
48
-            'category_product_order' => function ($item) {
48
+            'category_product_order' => function($item) {
49 49
                 return 0;
50 50
             },
51
-            'stores' => function ($item) {
51
+            'stores' => function($item) {
52 52
                 return $this->config->getDefaultStoresForProducts();
53 53
             },
54 54
             'concrete_sku' => 'identifier',
55 55
             'abstract_sku' => 'parent.abstract_sku',
56 56
             'abstract_product_creation' => 'parent.abstract_product_creation',
57
-            'prices' => function ($item) {
57
+            'prices' => function($item) {
58 58
                 $result = [];
59 59
                 foreach ($item['values']['price'] as $value) {
60 60
                     $result[] = [
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             'relations.others' => 'associations.PACK.product_models',
82 82
             'relations.x_sell' => 'associations.X_SELL.product_models',
83 83
             'relations.addon' => 'associations.SUBSTITUTION.product_models',
84
-            'is_searchable' => function () {
84
+            'is_searchable' => function() {
85 85
                 return true;
86 86
             },
87 87
         ];
Please login to merge, or discard this patch.
AkeneoPimMiddlewareConnector/Business/Mapper/Map/AttributeMapImportMap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@
 block discarded – undo
37 37
         return [
38 38
             'attribute_key' => 'code',
39 39
             'key' => 'code',
40
-            'allow_input' => function () {
40
+            'allow_input' => function() {
41 41
                 return false;
42 42
             },
43
-            'is_multiple' => function () {
43
+            'is_multiple' => function() {
44 44
                 return false;
45 45
             },
46
-            'input_type' => function ($value) {
46
+            'input_type' => function($value) {
47 47
                 return static::ATTRIBUTE_MAP[$value['type']];
48 48
             },
49 49
             'type' => 'type',
Please login to merge, or discard this patch.
Persistence/AkeneoPimMiddlewareConnectorRepository.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
     public function getSkuList(): array
19 19
     {
20 20
         $data = $this->getProvidedDependency(AkeneoPimMiddlewareConnectorDependencyProvider::PRODUCT_ABSTRACT_QUERY)
21
-           ->select('sku')
22
-           ->distinct()
23
-           ->find()
24
-           ->toArray();
21
+            ->select('sku')
22
+            ->distinct()
23
+            ->find()
24
+            ->toArray();
25 25
 
26 26
         return $data;
27 27
     }
Please login to merge, or discard this patch.
Business/Translator/TranslatorFunction/EnrichAttributes.php 1 patch
Spacing   +8 added lines, -10 removed lines patch added patch discarded remove patch
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
         }
121 121
 
122 122
         static::$attributeOptionMap = array_map(
123
-            function ($element) {
123
+            function($element) {
124 124
                 return $element[static::KEY_OPTIONS];
125 125
             },
126
-            array_filter($this->getMap(), function ($element) {
126
+            array_filter($this->getMap(), function($element) {
127 127
                 return
128 128
                     count($element[static::KEY_OPTIONS] ?? []) > 0 &&
129 129
                     in_array($element[static::KEY_TYPE], static::ATTRIBUTE_TYPES_WITH_OPTIONS);
@@ -131,19 +131,19 @@  discard block
 block discarded – undo
131 131
         );
132 132
 
133 133
         static::$attributeLocalizableMap = array_map(
134
-            function ($element) {
134
+            function($element) {
135 135
                 return $element[static::KEY_LOCALIZABLE];
136 136
             },
137
-            array_filter($this->getMap(), function ($element) {
137
+            array_filter($this->getMap(), function($element) {
138 138
                 return in_array($element[static::KEY_TYPE], static::ATTRIBUTE_TYPES_WITH_OPTIONS);
139 139
             })
140 140
         );
141 141
 
142 142
         static::$attributesForSkippingMap = array_map(
143
-            function ($element) {
143
+            function($element) {
144 144
                 return $element[static::KEY_KEY];
145 145
             },
146
-            array_filter($this->getMap(), function ($element) {
146
+            array_filter($this->getMap(), function($element) {
147 147
                 return in_array($element[static::KEY_TYPE], static::ATTRIBUTES_TYPES_FOR_SKIPPING) && $element[static::KEY_KEY] != static::ATTRIBUTE_PRICE;
148 148
             })
149 149
         );
@@ -206,8 +206,7 @@  discard block
 block discarded – undo
206 206
 
207 207
         foreach ($optionKeys as $optionKey) {
208 208
             $options[] = array_key_exists($optionKey, static::$attributeOptionMap[$attributeKey]) ?
209
-                static::$attributeOptionMap[$attributeKey][$optionKey] :
210
-                $optionKey;
209
+                static::$attributeOptionMap[$attributeKey][$optionKey] : $optionKey;
211 210
         }
212 211
 
213 212
         return $options;
@@ -228,8 +227,7 @@  discard block
 block discarded – undo
228 227
 
229 228
                 // Concatenate with comma for multiselect values
230 229
                 $value[$locale][static::KEY_DATA] = isset($value[$locale][static::KEY_DATA]) ?
231
-                    $value[$locale][static::KEY_DATA] . ', ' . $optionValue :
232
-                    $optionValue;
230
+                    $value[$locale][static::KEY_DATA].', '.$optionValue : $optionValue;
233 231
             }
234 232
         }
235 233
 
Please login to merge, or discard this patch.