Completed
Pull Request — master (#431)
by Sebastian
03:00
created
Controllers/Backend/Import.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function getImportedProductCategoriesTreeAction()
51 51
     {
52 52
         $parent = $this->request->getParam('categoryId', 'root');
53
-        $hideMapped = (bool) $this->request->getParam('hideMappedProducts', false);
53
+        $hideMapped = (bool)$this->request->getParam('hideMappedProducts', false);
54 54
 
55 55
         $query = $this->request->getParam('remoteCategoriesQuery', '');
56 56
         $node = $this->request->getParam('id');
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $category = $this->request->getParam('category', null);
112 112
         $shopId = $this->request->getParam('shopId', 0);
113
-        $limit = (int) $this->request->getParam('limit', 10);
114
-        $offset = (int) $this->request->getParam('start', 0);
115
-        $hideMapped = (bool) $this->request->getParam('hideMappedProducts', false);
113
+        $limit = (int)$this->request->getParam('limit', 10);
114
+        $offset = (int)$this->request->getParam('start', 0);
115
+        $hideMapped = (bool)$this->request->getParam('hideMappedProducts', false);
116 116
         $searchQuery = $this->request->getParam('remoteArticlesQuery', '');
117 117
 
118 118
         $stream = $this->request->getParam('stream', null);
@@ -153,9 +153,9 @@  discard block
 block discarded – undo
153 153
 
154 154
     public function loadBothArticleTypesAction()
155 155
     {
156
-        $categoryId = (int) $this->request->getParam('categoryId', 0);
157
-        $limit = (int) $this->request->getParam('limit', 10);
158
-        $offset = (int) $this->request->getParam('start', 0);
156
+        $categoryId = (int)$this->request->getParam('categoryId', 0);
157
+        $limit = (int)$this->request->getParam('limit', 10);
158
+        $offset = (int)$this->request->getParam('start', 0);
159 159
         $showOnlyConnectArticles = $this->request->getParam('showOnlyConnectArticles', null);
160 160
         $query = $this->request->getParam('localArticlesQuery', '');
161 161
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
     public function assignArticlesToCategoryAction()
178 178
     {
179
-        $categoryId = (int) $this->request->getParam('categoryId', 0);
179
+        $categoryId = (int)$this->request->getParam('categoryId', 0);
180 180
         $articleIds = $this->request->getParam('articleIds', []);
181 181
 
182 182
         $snippets = Shopware()->Snippets()->getNamespace('backend/connect/view/main');
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     public function unassignRemoteArticlesFromLocalCategoryAction()
235 235
     {
236 236
         $articleIds = $this->request->getParam('articleIds', []);
237
-        $categoryId = (int) $this->request->getParam('categoryId');
237
+        $categoryId = (int)$this->request->getParam('categoryId');
238 238
         try {
239 239
             $this->getImportService()->unAssignArticleCategories($articleIds, $categoryId);
240 240
         } catch (\Exception $e) {
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 
255 255
     public function assignRemoteToLocalCategoryAction()
256 256
     {
257
-        $localCategoryId = (int) $this->request->getParam('localCategoryId', 0);
257
+        $localCategoryId = (int)$this->request->getParam('localCategoryId', 0);
258 258
         $remoteCategoryKey = $this->request->getParam('remoteCategoryKey', null);
259 259
         $remoteCategoryLabel = $this->request->getParam('remoteCategoryLabel', null);
260 260
         $node = $this->request->getParam('node', null);
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     public function getArticleCountForRemoteCategoryAction()
311 311
     {
312 312
         $remoteCategoryKey = $this->request->getParam('remoteCategoryKey', '');
313
-        $shopId = (int) $this->request->getParam('shopId', 0);
313
+        $shopId = (int)$this->request->getParam('shopId', 0);
314 314
 
315 315
         try {
316 316
             $articleCount = $this->getImportService()->importRemoteCategoryGetArticleCountForCategory($shopId, $remoteCategoryKey);
@@ -326,18 +326,18 @@  discard block
 block discarded – undo
326 326
 
327 327
         $this->View()->assign([
328 328
             'success' => true,
329
-            'count' => (int) $articleCount
329
+            'count' => (int)$articleCount
330 330
         ]);
331 331
     }
332 332
 
333 333
     public function assignArticlesToRemoteCategoryAction()
334 334
     {
335 335
         $remoteCategoryKey = $this->request->getParam('remoteCategoryKey', '');
336
-        $localCategoryId = (int) $this->request->getParam('localCategoryId', 0);
337
-        $localParentId = (int) $this->request->getParam('localParentId', 0);
338
-        $offset = (int) $this->request->getParam('offset', 0);
339
-        $limit = (int) $this->request->getParam('limit', 0);
340
-        $shopId = (int) $this->request->getParam('shopId', 0);
336
+        $localCategoryId = (int)$this->request->getParam('localCategoryId', 0);
337
+        $localParentId = (int)$this->request->getParam('localParentId', 0);
338
+        $offset = (int)$this->request->getParam('offset', 0);
339
+        $limit = (int)$this->request->getParam('limit', 0);
340
+        $shopId = (int)$this->request->getParam('shopId', 0);
341 341
 
342 342
         try {
343 343
             $this->getImportService()->importRemoteCategoryAssignArticles($shopId, $remoteCategoryKey, $localCategoryId, $localParentId, $offset, $limit);
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
      */
362 362
     public function unassignRemoteToLocalCategoryAction()
363 363
     {
364
-        $localCategoryId = (int) $this->request->getParam('localCategoryId', 0);
364
+        $localCategoryId = (int)$this->request->getParam('localCategoryId', 0);
365 365
 
366 366
         if ($localCategoryId == 0) {
367 367
             $this->View()->assign([
Please login to merge, or discard this patch.