Passed
Branch develop (63dc7a)
by Andrew
03:11
created
src/services/OptimizedImages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
             if (Image::canManipulateAsImage($finalFormat)
119 119
                 && Image::canManipulateAsImage($finalFormat)
120 120
                 && $asset->height > 0) {
121
-                $variant =         [
121
+                $variant = [
122 122
                     'width'          => $asset->width,
123 123
                     'useAspectRatio' => false,
124 124
                     'aspectRatioX'   => $asset->width,
Please login to merge, or discard this patch.
src/config.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@
 block discarded – undo
53 53
     // It takes a bit of time, so if you never plan to use it, you can turn it off
54 54
     'createColorPalette' => true,
55 55
 
56
-     // Controls whether SVG placeholder silhouettes should be created for image variants
57
-     // It takes a bit of time, so if you never plan to use them, you can turn it off
56
+        // Controls whether SVG placeholder silhouettes should be created for image variants
57
+        // It takes a bit of time, so if you never plan to use them, you can turn it off
58 58
     'createPlaceholderSilhouettes' => true,
59 59
 
60 60
     // Controls whether retina images are automatically created with reduced quality
Please login to merge, or discard this patch.
src/models/OptimizedImage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
             return $this->defaultPlaceholderImage();
291 291
         }
292 292
 
293
-        return Template::raw($header . rawurlencode($content));
293
+        return Template::raw($header.rawurlencode($content));
294 294
     }
295 295
 
296 296
     /**
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
             return $this->defaultPlaceholderImage();
346 346
         }
347 347
 
348
-        return Template::raw($header . $content);
348
+        return Template::raw($header.$content);
349 349
     }
350 350
 
351 351
     /**
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
                         break;
455 455
                 }
456 456
                 if ($match) {
457
-                    $subset+= array_slice($set, $index, 1, true);
457
+                    $subset += array_slice($set, $index, 1, true);
458 458
                 }
459 459
                 $index++;
460 460
             }
@@ -482,9 +482,9 @@  discard block
 block discarded – undo
482 482
                     $descriptor = '3x';
483 483
                 }
484 484
             } else {
485
-                $descriptor = $key . 'w';
485
+                $descriptor = $key.'w';
486 486
             }
487
-            $srcset .= $value . ' ' . $descriptor . ', ';
487
+            $srcset .= $value.' '.$descriptor.', ';
488 488
         }
489 489
         $srcset = rtrim($srcset, ', ');
490 490
 
Please login to merge, or discard this patch.
src/ImageOptimize.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         Event::on(
113 113
             CraftVariable::class,
114 114
             CraftVariable::EVENT_INIT,
115
-            function (Event $event) {
115
+            function(Event $event) {
116 116
                 /** @var CraftVariable $variable */
117 117
                 $variable = $event->sender;
118 118
                 $variable->set('imageOptimize', ImageOptimizeVariable::class);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         Event::on(
124 124
             Fields::class,
125 125
             Fields::EVENT_REGISTER_FIELD_TYPES,
126
-            function (RegisterComponentTypesEvent $event) {
126
+            function(RegisterComponentTypesEvent $event) {
127 127
                 Craft::debug(
128 128
                     'Fields::EVENT_REGISTER_FIELD_TYPES',
129 129
                     __METHOD__
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         Event::on(
137 137
             Fields::class,
138 138
             Fields::EVENT_AFTER_SAVE_FIELD,
139
-            function (FieldEvent $event) {
139
+            function(FieldEvent $event) {
140 140
                 Craft::debug(
141 141
                     'Fields::EVENT_AFTER_SAVE_FIELD',
142 142
                     __METHOD__
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         Event::on(
175 175
             Plugins::class,
176 176
             Plugins::EVENT_AFTER_SAVE_PLUGIN_SETTINGS,
177
-            function (PluginEvent $event) {
177
+            function(PluginEvent $event) {
178 178
                 if ($event->plugin === $this) {
179 179
                     Craft::debug(
180 180
                         'Plugins::EVENT_AFTER_SAVE_PLUGIN_SETTINGS',
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         Event::on(
194 194
             Volumes::class,
195 195
             Volumes::EVENT_AFTER_SAVE_VOLUME,
196
-            function (VolumeEvent $event) {
196
+            function(VolumeEvent $event) {
197 197
                 Craft::debug(
198 198
                     'Volumes::EVENT_AFTER_SAVE_VOLUME',
199 199
                     __METHOD__
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         Event::on(
215 215
             Assets::class,
216 216
             Assets::EVENT_GET_ASSET_URL,
217
-            function (GetAssetUrlEvent $event) {
217
+            function(GetAssetUrlEvent $event) {
218 218
                 Craft::debug(
219 219
                     'Assets::EVENT_GET_ASSET_URL',
220 220
                     __METHOD__
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         Event::on(
231 231
             AssetTransforms::class,
232 232
             AssetTransforms::EVENT_GENERATE_TRANSFORM,
233
-            function (GenerateTransformEvent $event) {
233
+            function(GenerateTransformEvent $event) {
234 234
                 Craft::debug(
235 235
                     'AssetTransforms::EVENT_GENERATE_TRANSFORM',
236 236
                     __METHOD__
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         Event::on(
247 247
             AssetTransforms::class,
248 248
             AssetTransforms::EVENT_AFTER_DELETE_TRANSFORMS,
249
-            function (AssetTransformImageEvent $event) {
249
+            function(AssetTransformImageEvent $event) {
250 250
                 Craft::debug(
251 251
                     'AssetTransforms::EVENT_AFTER_DELETE_TRANSFORMS',
252 252
                     __METHOD__
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         Event::on(
263 263
             Elements::class,
264 264
             Elements::EVENT_BEFORE_SAVE_ELEMENT,
265
-            function (ElementEvent $event) {
265
+            function(ElementEvent $event) {
266 266
                 Craft::debug(
267 267
                     'Elements::EVENT_BEFORE_SAVE_ELEMENT',
268 268
                     __METHOD__
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         Event::on(
288 288
             Elements::class,
289 289
             Elements::EVENT_BEFORE_DELETE_ELEMENT,
290
-            function (ElementEvent $event) {
290
+            function(ElementEvent $event) {
291 291
                 Craft::debug(
292 292
                     'Elements::EVENT_BEFORE_DELETE_ELEMENT',
293 293
                     __METHOD__
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
         Event::on(
312 312
             Assets::class,
313 313
             Assets::EVENT_BEFORE_REPLACE_ASSET,
314
-            function (ReplaceAssetEvent $event) {
314
+            function(ReplaceAssetEvent $event) {
315 315
                 Craft::debug(
316 316
                     'Assets::EVENT_BEFORE_REPLACE_ASSET',
317 317
                     __METHOD__
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
         Event::on(
334 334
             Assets::class,
335 335
             Assets::EVENT_AFTER_REPLACE_ASSET,
336
-            function (ReplaceAssetEvent $event) {
336
+            function(ReplaceAssetEvent $event) {
337 337
                 Craft::debug(
338 338
                     'Assets::EVENT_AFTER_REPLACE_ASSET',
339 339
                     __METHOD__
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
         Event::on(
349 349
             Plugins::class,
350 350
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
351
-            function (PluginEvent $event) {
351
+            function(PluginEvent $event) {
352 352
                 if ($event->plugin === $this) {
353 353
                     $request = Craft::$app->getRequest();
354 354
                     if (($request->isCpRequest) && (!$request->isConsoleRequest)) {
Please login to merge, or discard this patch.