Completed
Pull Request — master (#10)
by Tim
02:23
created
src/Observers/UrlRewriteObserver.php 1 patch
Indentation   +29 added lines, -29 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();
@@ -237,13 +237,13 @@  discard block
 block discarded – undo
237 237
         if (!$this->isVisible()) {
238 238
             // log a message
239 239
             $this->getSubject()
240
-                 ->getSystemLogger()
241
-                 ->debug(
242
-                     sprintf(
243
-                         'Product with SKU "%s" is not visible, so no URL rewrites will be created',
244
-                         $sku
245
-                     )
246
-                 );
240
+                    ->getSystemLogger()
241
+                    ->debug(
242
+                        sprintf(
243
+                            'Product with SKU "%s" is not visible, so no URL rewrites will be created',
244
+                            $sku
245
+                        )
246
+                    );
247 247
 
248 248
             // return without creating any rewrites
249 249
             return $this->getRow();
@@ -298,8 +298,8 @@  discard block
 block discarded – undo
298 298
                     // query whether or not debug mode has been enabled
299 299
                     if ($this->getSubject()->isDebugMode()) {
300 300
                         $this->getSubject()
301
-                             ->getSystemLogger()
302
-                             ->warning($this->getSubject()->appendExceptionSuffix($e->getMessage()));
301
+                                ->getSystemLogger()
302
+                                ->warning($this->getSubject()->appendExceptionSuffix($e->getMessage()));
303 303
                     } else {
304 304
                         throw $e;
305 305
                     }
@@ -363,8 +363,8 @@  discard block
 block discarded – undo
363 363
                 // query whether or not debug mode has been enabled
364 364
                 if ($this->getSubject()->isDebugMode()) {
365 365
                     $this->getSubject()
366
-                         ->getSystemLogger()
367
-                         ->warning($this->getSubject()->appendExceptionSuffix($e->getMessage()));
366
+                            ->getSystemLogger()
367
+                            ->warning($this->getSubject()->appendExceptionSuffix($e->getMessage()));
368 368
                 } else {
369 369
                     throw $e;
370 370
                 }
@@ -412,8 +412,8 @@  discard block
 block discarded – undo
412 412
                 $this->productCategoryIds[] = $categoryId;
413 413
             } else {
414 414
                 $this->getSubject()
415
-                     ->getSystemLogger()
416
-                     ->debug(sprintf('Don\'t create URL rewrite for category "%s" because of missing anchor flag', $category[MemberNames::PATH]));
415
+                        ->getSystemLogger()
416
+                        ->debug(sprintf('Don\'t create URL rewrite for category "%s" because of missing anchor flag', $category[MemberNames::PATH]));
417 417
             }
418 418
         }
419 419
 
Please login to merge, or discard this patch.
src/Observers/UrlRewriteUpdateObserver.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
 
99 99
                             // finally log a warning that the old category is not available ony more
100 100
                             $this->getSubject()
101
-                                 ->getSystemLogger()
102
-                                 ->warning(
103
-                                     sprintf(
104
-                                         'Category with ID "%d" is not longer available for URL rewrite with ID "%d"',
105
-                                         $metadata[UrlRewriteObserver::CATEGORY_ID],
106
-                                         $existingUrlRewrite[MemberNames::URL_REWRITE_ID]
107
-                                     )
108
-                                 );
101
+                                    ->getSystemLogger()
102
+                                    ->warning(
103
+                                        sprintf(
104
+                                            'Category with ID "%d" is not longer available for URL rewrite with ID "%d"',
105
+                                            $metadata[UrlRewriteObserver::CATEGORY_ID],
106
+                                            $existingUrlRewrite[MemberNames::URL_REWRITE_ID]
107
+                                        )
108
+                                    );
109 109
                         }
110 110
                     }
111 111
                 }
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
                 if ($targetPath === $existingUrlRewrite[MemberNames::REQUEST_PATH]) {
118 118
                     // finally log a warning that the old category is not available ony more
119 119
                     $this->getSubject()
120
-                         ->getSystemLogger()
121
-                         ->warning(
122
-                             sprintf(
123
-                                 'New target path "%s" eqals request path for URL rewrite with ID "%d"',
124
-                                 $existingUrlRewrite[MemberNames::REQUEST_PATH],
125
-                                 $existingUrlRewrite[MemberNames::URL_REWRITE_ID]
126
-                             )
127
-                         );
120
+                            ->getSystemLogger()
121
+                            ->warning(
122
+                                sprintf(
123
+                                    'New target path "%s" eqals request path for URL rewrite with ID "%d"',
124
+                                    $existingUrlRewrite[MemberNames::REQUEST_PATH],
125
+                                    $existingUrlRewrite[MemberNames::URL_REWRITE_ID]
126
+                                )
127
+                            );
128 128
 
129 129
                     // stop processing the URL rewrite
130 130
                     continue;
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
 
150 150
                     // log a message, that old URL rewrites have been cleaned-up
151 151
                     $this->getSubject()
152
-                         ->getSystemLogger()
153
-                         ->warning(
154
-                             sprintf(
155
-                                 'Cleaned-up %d URL rewrite "%s" for product with SKU "%s"',
156
-                                 $existingUrlRewrite[MemberNames::REQUEST_PATH],
157
-                                 $this->getValue(ColumnKeys::SKU)
158
-                             )
159
-                         );
152
+                            ->getSystemLogger()
153
+                            ->warning(
154
+                                sprintf(
155
+                                    'Cleaned-up %d URL rewrite "%s" for product with SKU "%s"',
156
+                                    $existingUrlRewrite[MemberNames::REQUEST_PATH],
157
+                                    $this->getValue(ColumnKeys::SKU)
158
+                                )
159
+                            );
160 160
                 }
161 161
             }
162 162
         }
Please login to merge, or discard this patch.