Completed
Pull Request — master (#410)
by Jonas
03:01
created
Components/ProductToShop.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
             $this->categoryDenormalization->addAssignment($model->getId(), $category);
471 471
             $this->manager->getConnection()->executeQuery(
472 472
                 'INSERT IGNORE INTO `s_articles_categories` (`articleID`, `categoryID`) VALUES (?,?)',
473
-                [$model->getId(),  $category]
473
+                [$model->getId(), $category]
474 474
             );
475 475
         }
476 476
         $this->categoryDenormalization->enableTransactions();
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
         }
865 865
 
866 866
         //save category Ids before flush
867
-        $oldCategoryIds = array_map(function ($category) {
867
+        $oldCategoryIds = array_map(function($category) {
868 868
             return $category->getId();
869 869
         }, $article->getCategories()->toArray());
870 870
 
@@ -1020,7 +1020,7 @@  discard block
 block discarded – undo
1020 1020
         $detailAttribute->setConnectReference($product->sourceId);
1021 1021
         $detailAttribute->setConnectArticleShipping($product->shipping);
1022 1022
         //todo@sb: check if connectAttribute matches position of the marketplace attribute
1023
-        array_walk($product->attributes, function ($value, $key) use ($detailAttribute) {
1023
+        array_walk($product->attributes, function($value, $key) use ($detailAttribute) {
1024 1024
             $shopwareAttribute = $this->marketplaceGateway->findShopwareMappingFor($key);
1025 1025
             if (strlen($shopwareAttribute) > 0) {
1026 1026
                 $setter = 'set' . ucfirst($shopwareAttribute);
Please login to merge, or discard this patch.
Components/CategoryResolver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     {
131 131
         $currentProductCategoryIds = $this->productToRemoteCategoryRepository->getRemoteCategoryIds($articleId);
132 132
 
133
-        $assignedCategoryIds = array_map(function (RemoteCategory $assignedCategory) {
133
+        $assignedCategoryIds = array_map(function(RemoteCategory $assignedCategory) {
134 134
             $assignedCategory->getId();
135 135
         }, $assignedCategories);
136 136
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     public function deleteEmptyConnectCategories($categoryIds)
172 172
     {
173 173
         foreach ($categoryIds as $categoryId) {
174
-            $articleCount = (int) $this->manager->getConnection()->fetchColumn(
174
+            $articleCount = (int)$this->manager->getConnection()->fetchColumn(
175 175
                 'SELECT COUNT(id) FROM s_articles_categories WHERE categoryID = ?',
176 176
                 [$categoryId]
177 177
             );
@@ -191,13 +191,13 @@  discard block
 block discarded – undo
191 191
             [$categoryId]
192 192
         );
193 193
 
194
-        $childCount = (int) $this->manager->getConnection()->fetchColumn(
194
+        $childCount = (int)$this->manager->getConnection()->fetchColumn(
195 195
             'SELECT COUNT(id) FROM s_categories WHERE parent = ?',
196 196
             [$categoryId]
197 197
         );
198 198
 
199 199
         if ($connectImported == 1 && $childCount === 0) {
200
-            $parent = (int) $this->manager->getConnection()->fetchColumn(
200
+            $parent = (int)$this->manager->getConnection()->fetchColumn(
201 201
                 'SELECT parent FROM s_categories WHERE `id` = ?',
202 202
                 [$categoryId]
203 203
             );
Please login to merge, or discard this patch.