Completed
Push — master ( 381fd2...7bc757 )
by Tim
12s queued 10s
created
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.
src/Observers/UrlRewriteObserver.php 1 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.