Completed
Push — master ( 381fd2...7bc757 )
by Tim
12s queued 10s
created
src/Observers/UrlRewriteObserver.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     /**
118 118
      * Return's the product bunch processor instance.
119 119
      *
120
-     * @return \TechDivision\Import\Product\Services\ProductBunchProcessorInterface The product bunch processor instance
120
+     * @return ProductUrlRewriteProcessorInterface The product bunch processor instance
121 121
      */
122 122
     protected function getProductUrlRewriteProcessor()
123 123
     {
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
      * @param string $path          The path of the category to return
623 623
      * @param string $storeViewCode The store view code of the category to return
624 624
      *
625
-     * @return array The category
625
+     * @return string The category
626 626
      */
627 627
     protected function getCategoryByPath($path, $storeViewCode = StoreViewCodes::ADMIN)
628 628
     {
Please login to merge, or discard this patch.
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -197,14 +197,14 @@  discard block
 block discarded – undo
197 197
         if ($storeViewCode === StoreViewCodes::ADMIN) {
198 198
             // log a message and return
199 199
             $this->getSubject()
200
-                 ->getSystemLogger()
201
-                 ->debug(
202
-                     sprintf(
203
-                         'Store with code "%s" is not active, no URL rewrites will be created for product with SKU "%s"',
204
-                         $storeViewCode,
205
-                         $sku
206
-                     )
207
-                 );
200
+                    ->getSystemLogger()
201
+                    ->debug(
202
+                        sprintf(
203
+                            'Store with code "%s" is not active, no URL rewrites will be created for product with SKU "%s"',
204
+                            $storeViewCode,
205
+                            $sku
206
+                        )
207
+                    );
208 208
 
209 209
             // return without creating any rewrites
210 210
             return $this->getRow();
@@ -214,14 +214,14 @@  discard block
 block discarded – undo
214 214
         if (!$this->getSubject()->storeIsActive($storeViewCode)) {
215 215
             // log a message and return
216 216
             $this->getSubject()
217
-                 ->getSystemLogger()
218
-                 ->debug(
219
-                     sprintf(
220
-                         'Store with code "%s" is not active, no URL rewrites will be created for product with SKU "%s"',
221
-                         $storeViewCode,
222
-                         $sku
223
-                     )
224
-                 );
217
+                    ->getSystemLogger()
218
+                    ->debug(
219
+                        sprintf(
220
+                            'Store with code "%s" is not active, no URL rewrites will be created for product with SKU "%s"',
221
+                            $storeViewCode,
222
+                            $sku
223
+                        )
224
+                    );
225 225
 
226 226
             // return without creating any rewrites
227 227
             return $this->getRow();
@@ -280,8 +280,8 @@  discard block
 block discarded – undo
280 280
                     // query whether or not debug mode has been enabled
281 281
                     if ($this->getSubject()->isDebugMode()) {
282 282
                         $this->getSubject()
283
-                             ->getSystemLogger()
284
-                             ->warning($this->getSubject()->appendExceptionSuffix($e->getMessage()));
283
+                                ->getSystemLogger()
284
+                                ->warning($this->getSubject()->appendExceptionSuffix($e->getMessage()));
285 285
                     } else {
286 286
                         throw $e;
287 287
                     }
@@ -330,18 +330,18 @@  discard block
 block discarded – undo
330 330
         // do NOT create new URL rewrites, if the product is NOT visible (any more), BUT
331 331
         // handle existing URL rewrites, e. g. to remove and clean up the URL rewrites
332 332
         if (!$this->isVisible()) {
333
-             // log a message
334
-             $this->getSubject()
335
-                 ->getSystemLogger()
336
-                 ->debug(
337
-                     sprintf(
338
-                         'Product with SKU "%s" is not visible, so no URL rewrites will be created',
339
-                         $this->getValue(ColumnKeys::SKU)
340
-                     )
341
-                 );
342
-
343
-             // return without creating any rewrites
344
-             return;
333
+                // log a message
334
+                $this->getSubject()
335
+                    ->getSystemLogger()
336
+                    ->debug(
337
+                        sprintf(
338
+                            'Product with SKU "%s" is not visible, so no URL rewrites will be created',
339
+                            $this->getValue(ColumnKeys::SKU)
340
+                        )
341
+                    );
342
+
343
+                // return without creating any rewrites
344
+                return;
345 345
         }
346 346
 
347 347
         // load the root category, because we need that to create the default product URL rewrite
@@ -366,8 +366,8 @@  discard block
 block discarded – undo
366 366
                 // query whether or not debug mode has been enabled
367 367
                 if ($this->getSubject()->isDebugMode()) {
368 368
                     $this->getSubject()
369
-                         ->getSystemLogger()
370
-                         ->warning($this->getSubject()->appendExceptionSuffix($e->getMessage()));
369
+                            ->getSystemLogger()
370
+                            ->warning($this->getSubject()->appendExceptionSuffix($e->getMessage()));
371 371
                 } else {
372 372
                     throw $e;
373 373
                 }
Please login to merge, or discard this patch.
tests/unit/Observers/UrlRewriteUpdateObserverTest.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 
67 67
         // initialize a mock processor instance
68 68
         $this->mockProductUrlRewriteProcessor = $this->getMockBuilder('TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface')
69
-                                                     ->setMethods(get_class_methods('TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface'))
70
-                                                     ->getMock();
69
+                                                        ->setMethods(get_class_methods('TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface'))
70
+                                                        ->getMock();
71 71
 
72 72
         // initialize the observer
73 73
         $this->observer = new UrlRewriteUpdateObserver($this->mockProductUrlRewriteProcessor);
@@ -104,14 +104,14 @@  discard block
 block discarded – undo
104 104
 
105 105
         // initialize the categories
106 106
         $categories = array(
107
-             $path1 = 'Default Category'                                => array(MemberNames::ENTITY_ID => 2, MemberNames::PARENT_ID => 1, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => null, MemberNames::PATH => $path1),
108
-             $path2 = 'Default Category/Men'                            => array(MemberNames::ENTITY_ID => 3, MemberNames::PARENT_ID => 2, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men', MemberNames::PATH => $path2),
109
-             $path3 = 'Default Category/Men/Tops'                       => array(MemberNames::ENTITY_ID => 4, MemberNames::PARENT_ID => 3, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men/tops-men', MemberNames::PATH => $path3),
110
-             $path4 = 'Default Category/Men/Tops/Hoodies & Sweatshirts' => array(MemberNames::ENTITY_ID => 5, MemberNames::PARENT_ID => 4, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men/tops-men/hoodies-and-sweatshirts-men', MemberNames::PATH => $path4),
111
-             $path5 = 'Default Category/Collections'                    => array(MemberNames::ENTITY_ID => 6, MemberNames::PARENT_ID => 3, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'collections', MemberNames::PATH => $path5),
112
-             $path6 = 'Default Category/Collections/Eco Friendly'       => array(MemberNames::ENTITY_ID => 7, MemberNames::PARENT_ID => 6, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'collections/eco-friendly', MemberNames::PATH => $path6),
113
-             $path7 = 'Default Category/Collections/Old'                => array(MemberNames::ENTITY_ID => 8, MemberNames::PARENT_ID => 6, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'collections/old', MemberNames::PATH => $path7),
114
-             $path8 = 'Default Category/Men/Old'                        => array(MemberNames::ENTITY_ID => 9, MemberNames::PARENT_ID => 3, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men/old', MemberNames::PATH => $path8),
107
+                $path1 = 'Default Category'                                => array(MemberNames::ENTITY_ID => 2, MemberNames::PARENT_ID => 1, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => null, MemberNames::PATH => $path1),
108
+                $path2 = 'Default Category/Men'                            => array(MemberNames::ENTITY_ID => 3, MemberNames::PARENT_ID => 2, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men', MemberNames::PATH => $path2),
109
+                $path3 = 'Default Category/Men/Tops'                       => array(MemberNames::ENTITY_ID => 4, MemberNames::PARENT_ID => 3, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men/tops-men', MemberNames::PATH => $path3),
110
+                $path4 = 'Default Category/Men/Tops/Hoodies & Sweatshirts' => array(MemberNames::ENTITY_ID => 5, MemberNames::PARENT_ID => 4, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men/tops-men/hoodies-and-sweatshirts-men', MemberNames::PATH => $path4),
111
+                $path5 = 'Default Category/Collections'                    => array(MemberNames::ENTITY_ID => 6, MemberNames::PARENT_ID => 3, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'collections', MemberNames::PATH => $path5),
112
+                $path6 = 'Default Category/Collections/Eco Friendly'       => array(MemberNames::ENTITY_ID => 7, MemberNames::PARENT_ID => 6, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'collections/eco-friendly', MemberNames::PATH => $path6),
113
+                $path7 = 'Default Category/Collections/Old'                => array(MemberNames::ENTITY_ID => 8, MemberNames::PARENT_ID => 6, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'collections/old', MemberNames::PATH => $path7),
114
+                $path8 = 'Default Category/Men/Old'                        => array(MemberNames::ENTITY_ID => 9, MemberNames::PARENT_ID => 3, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men/old', MemberNames::PATH => $path8),
115 115
         );
116 116
 
117 117
         // initialize a mock import adapter instance
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
 
124 124
         // mock the system logger
125 125
         $mockSystemLogger = $this->getMockBuilder('Psr\Log\LoggerInterface')
126
-                                 ->setMethods(get_class_methods('Psr\Log\LoggerInterface'))
127
-                                 ->getMock();
126
+                                    ->setMethods(get_class_methods('Psr\Log\LoggerInterface'))
127
+                                    ->getMock();
128 128
 
129 129
         // the found URL rewrites
130 130
         $urlRewrites = array(
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
                     ->method('getUrlRewritesByEntityTypeAndEntityIdAndStoreId')
318 318
                     ->with(UrlRewriteObserver::ENTITY_TYPE, $entityId, $storeId)
319 319
                     ->willReturn($urlRewrites);
320
-       $this->mockProductUrlRewriteProcessor->expects($this->exactly(6))
320
+        $this->mockProductUrlRewriteProcessor->expects($this->exactly(6))
321 321
                     ->method('persistUrlRewrite')
322 322
                     ->withConsecutive(
323 323
                         array(
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -301,7 +301,7 @@
 block discarded – undo
301 301
         $mockSubject->expects($this->any())
302 302
                     ->method('getCoreConfigData')
303 303
                     ->will(
304
-                        $this->returnCallback(function ($arg1, $arg2) {
304
+                        $this->returnCallback(function($arg1, $arg2) {
305 305
                             return $arg2;
306 306
                         })
307 307
                     );
Please login to merge, or discard this patch.
RoboFile.php 2 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -18,10 +18,6 @@
 block discarded – undo
18 18
  * @link      http://www.techdivision.com
19 19
  */
20 20
 
21
-use Lurker\Event\FilesystemEvent;
22
-
23
-use Symfony\Component\Finder\Finder;
24
-
25 21
 /**
26 22
  * Defines the available build tasks.
27 23
  *
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
     {
59 59
         // optimize autoloader with custom path
60 60
         return $this->taskComposerInstall()
61
-             ->preferDist()
62
-             ->optimizeAutoloader()
63
-             ->run();
61
+                ->preferDist()
62
+                ->optimizeAutoloader()
63
+                ->run();
64 64
     }
65 65
 
66 66
     /**
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
     {
73 73
         // optimize autoloader with custom path
74 74
         return $this->taskComposerUpdate()
75
-             ->preferDist()
76
-             ->optimizeAutoloader()
77
-             ->run();
75
+                ->preferDist()
76
+                ->optimizeAutoloader()
77
+                ->run();
78 78
     }
79 79
 
80 80
     /**
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
     public function prepare()
96 96
     {
97 97
         return $this->taskFileSystemStack()
98
-             ->mkdir($this->properties['dist.dir'])
99
-             ->mkdir($this->properties['target.dir'])
100
-             ->mkdir(sprintf('%s/reports', $this->properties['target.dir']))
101
-             ->run();
98
+                ->mkdir($this->properties['dist.dir'])
99
+                ->mkdir($this->properties['target.dir'])
100
+                ->mkdir(sprintf('%s/reports', $this->properties['target.dir']))
101
+                ->run();
102 102
     }
103 103
 
104 104
     /**
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
 
169 169
         // run PHPUnit
170 170
         return $this->taskPHPUnit(sprintf('%s/bin/phpunit', $this->properties['vendor.dir']))
171
-             ->configFile('phpunit.xml')
172
-             ->run();
171
+                ->configFile('phpunit.xml')
172
+                ->run();
173 173
     }
174 174
 
175 175
     /**
Please login to merge, or discard this patch.
src/Observers/UrlRewriteUpdateObserver.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
 
101 101
                             // finally log a warning that the old category is not available ony more
102 102
                             $this->getSubject()
103
-                                 ->getSystemLogger()
104
-                                 ->warning(
105
-                                     sprintf(
106
-                                         'Category with ID "%d" is not longer available for URL rewrite with ID "%d"',
107
-                                         $metadata[UrlRewriteObserver::CATEGORY_ID],
108
-                                         $existingUrlRewrite[MemberNames::URL_REWRITE_ID]
109
-                                     )
110
-                                 );
103
+                                    ->getSystemLogger()
104
+                                    ->warning(
105
+                                        sprintf(
106
+                                            'Category with ID "%d" is not longer available for URL rewrite with ID "%d"',
107
+                                            $metadata[UrlRewriteObserver::CATEGORY_ID],
108
+                                            $existingUrlRewrite[MemberNames::URL_REWRITE_ID]
109
+                                        )
110
+                                    );
111 111
                         }
112 112
                     }
113 113
                 }
@@ -119,14 +119,14 @@  discard block
 block discarded – undo
119 119
                 if ($targetPath === $existingUrlRewrite[MemberNames::REQUEST_PATH]) {
120 120
                     // finally log a warning that the old category is not available ony more
121 121
                     $this->getSubject()
122
-                         ->getSystemLogger()
123
-                         ->warning(
124
-                             sprintf(
125
-                                 'New target path "%s" eqals request path for URL rewrite with ID "%d"',
126
-                                 $existingUrlRewrite[MemberNames::REQUEST_PATH],
127
-                                 $existingUrlRewrite[MemberNames::URL_REWRITE_ID]
128
-                             )
129
-                         );
122
+                            ->getSystemLogger()
123
+                            ->warning(
124
+                                sprintf(
125
+                                    'New target path "%s" eqals request path for URL rewrite with ID "%d"',
126
+                                    $existingUrlRewrite[MemberNames::REQUEST_PATH],
127
+                                    $existingUrlRewrite[MemberNames::URL_REWRITE_ID]
128
+                                )
129
+                            );
130 130
 
131 131
                     // stop processing the URL rewrite
132 132
                     continue;
@@ -153,14 +153,14 @@  discard block
 block discarded – undo
153 153
 
154 154
                     // log a message, that old URL rewrites have been cleaned-up
155 155
                     $this->getSubject()
156
-                         ->getSystemLogger()
157
-                         ->warning(
158
-                             sprintf(
159
-                                 'Cleaned-up URL rewrite "%s" for product with SKU "%s"',
160
-                                 $existingUrlRewrite[MemberNames::REQUEST_PATH],
161
-                                 $this->getValue(ColumnKeys::SKU)
162
-                             )
163
-                         );
156
+                            ->getSystemLogger()
157
+                            ->warning(
158
+                                sprintf(
159
+                                    'Cleaned-up URL rewrite "%s" for product with SKU "%s"',
160
+                                    $existingUrlRewrite[MemberNames::REQUEST_PATH],
161
+                                    $this->getValue(ColumnKeys::SKU)
162
+                                )
163
+                            );
164 164
                 }
165 165
             }
166 166
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 
106 106
                 // skip update of URL rewrite, if nothing to change
107 107
                 if ($targetPath === $existingUrlRewrite[MemberNames::TARGET_PATH] &&
108
-                    301 === (int)$existingUrlRewrite[MemberNames::REDIRECT_TYPE]) {
108
+                    301 === (int) $existingUrlRewrite[MemberNames::REDIRECT_TYPE]) {
109 109
                     // stop processing the URL rewrite
110 110
                     continue;
111 111
                 }
Please login to merge, or discard this patch.
tests/unit/Observers/UrlRewriteObserverTest.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
 
69 69
         // initialize a mock processor instance
70 70
         $this->mockProductUrlRewriteProcessor = $this->getMockBuilder('TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface')
71
-                                                     ->setMethods(get_class_methods('TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface'))
72
-                                                     ->getMock();
71
+                                                        ->setMethods(get_class_methods('TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface'))
72
+                                                        ->getMock();
73 73
 
74 74
         // initialize the observer
75 75
         $this->observer = new UrlRewriteObserver($this->mockProductUrlRewriteProcessor);
@@ -304,12 +304,12 @@  discard block
 block discarded – undo
304 304
 
305 305
         // initialize the categories
306 306
         $categories = array(
307
-             $path1 = 'Default Category'                                => array(MemberNames::ENTITY_ID => 2, MemberNames::PARENT_ID => 1, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => null, MemberNames::PATH => $path1),
308
-             $path2 = 'Default Category/Men'                            => array(MemberNames::ENTITY_ID => 3, MemberNames::PARENT_ID => 2, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men', MemberNames::PATH => $path2),
309
-             $path3 = 'Default Category/Men/Tops'                       => array(MemberNames::ENTITY_ID => 4, MemberNames::PARENT_ID => 3, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men/tops-men', MemberNames::PATH => $path3),
310
-             $path4 = 'Default Category/Men/Tops/Hoodies & Sweatshirts' => array(MemberNames::ENTITY_ID => 5, MemberNames::PARENT_ID => 4, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men/tops-men/hoodies-and-sweatshirts-men', MemberNames::PATH => $path4),
311
-             $path5 = 'Default Category/Collections'                    => array(MemberNames::ENTITY_ID => 6, MemberNames::PARENT_ID => 3, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'collections', MemberNames::PATH => $path5),
312
-             $path6 = 'Default Category/Collections/Eco Friendly'       => array(MemberNames::ENTITY_ID => 7, MemberNames::PARENT_ID => 6, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'collections/eco-friendly', MemberNames::PATH => $path6),
307
+                $path1 = 'Default Category'                                => array(MemberNames::ENTITY_ID => 2, MemberNames::PARENT_ID => 1, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => null, MemberNames::PATH => $path1),
308
+                $path2 = 'Default Category/Men'                            => array(MemberNames::ENTITY_ID => 3, MemberNames::PARENT_ID => 2, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men', MemberNames::PATH => $path2),
309
+                $path3 = 'Default Category/Men/Tops'                       => array(MemberNames::ENTITY_ID => 4, MemberNames::PARENT_ID => 3, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men/tops-men', MemberNames::PATH => $path3),
310
+                $path4 = 'Default Category/Men/Tops/Hoodies & Sweatshirts' => array(MemberNames::ENTITY_ID => 5, MemberNames::PARENT_ID => 4, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'men/tops-men/hoodies-and-sweatshirts-men', MemberNames::PATH => $path4),
311
+                $path5 = 'Default Category/Collections'                    => array(MemberNames::ENTITY_ID => 6, MemberNames::PARENT_ID => 3, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'collections', MemberNames::PATH => $path5),
312
+                $path6 = 'Default Category/Collections/Eco Friendly'       => array(MemberNames::ENTITY_ID => 7, MemberNames::PARENT_ID => 6, MemberNames::IS_ANCHOR => null, MemberNames::URL_PATH => 'collections/eco-friendly', MemberNames::PATH => $path6),
313 313
         );
314 314
 
315 315
         // initialize a mock import adapter instance
@@ -331,8 +331,8 @@  discard block
 block discarded – undo
331 331
 
332 332
         // mock the system logger
333 333
         $mockSystemLogger = $this->getMockBuilder('Psr\Log\LoggerInterface')
334
-                                 ->setMethods(get_class_methods('Psr\Log\LoggerInterface'))
335
-                                 ->getMock();
334
+                                    ->setMethods(get_class_methods('Psr\Log\LoggerInterface'))
335
+                                    ->getMock();
336 336
 
337 337
         // create a mock subject
338 338
         $mockSubject = $this->getMockBuilder('TechDivision\Import\Product\UrlRewrite\Subjects\UrlRewriteSubject')
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
                             return $arg2;
464 464
                         })
465 465
                     );
466
-       $mockSubject->expects(($this->exactly(4)))
466
+        $mockSubject->expects(($this->exactly(4)))
467 467
                     ->method('getImportAdapter')
468 468
                     ->willReturn($mockImportAdapter);
469 469
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -301,7 +301,7 @@
 block discarded – undo
301 301
         $mockSubject->expects($this->any())
302 302
                     ->method('getCoreConfigData')
303 303
                     ->will(
304
-                        $this->returnCallback(function ($arg1, $arg2) {
304
+                        $this->returnCallback(function($arg1, $arg2) {
305 305
                             return $arg2;
306 306
                         })
307 307
                     );
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
      * Create's and invokes the UrlRewriteObserver instance.
81 81
      *
82 82
      * @param boolean $generateCategoryProductRewrites Whether or not the configuration to generare catagory/product URL rewrites has been activated
83
-     * @param array   $productCategoryIds              The array with the category IDs the product has been related with
83
+     * @param string[]   $productCategoryIds              The array with the category IDs the product has been related with
84 84
      * @param array   $category                        The array with the categories
85 85
      *
86 86
      * @return void
Please login to merge, or discard this patch.
src/Repositories/UrlRewriteRepository.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
      *
55 55
      * @param string $sku The SKU to load the URL rewrites for
56 56
      *
57
-     * @return array The URL rewrites
57
+     * @return \Generator The URL rewrites
58 58
      */
59 59
     public function findAllBySku($sku)
60 60
     {
Please login to merge, or discard this patch.
src/Observers/ProductUrlRewriteObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
                     // query whether or not a URL key has be specfied and the store view codes are equal
97 97
                     if ($this->hasValue(ColumnKeys::URL_KEY) && $this->artefacts[$i][ColumnKeys::STORE_VIEW_CODE] === $storeViewCode) {
98 98
                         // update the URL key
99
-                        $this->artefacts[$i][ColumnKeys::URL_KEY]    = $this->getValue(ColumnKeys::URL_KEY);
99
+                        $this->artefacts[$i][ColumnKeys::URL_KEY] = $this->getValue(ColumnKeys::URL_KEY);
100 100
                         // update the visibility, if available
101 101
                         if ($this->hasValue(ColumnKeys::VISIBILITY)) {
102 102
                             $this->artefacts[$i][ColumnKeys::VISIBILITY] = $this->getValue(ColumnKeys::VISIBILITY);
Please login to merge, or discard this patch.