Passed
Push — develop ( 4ac642...83abb8 )
by Andrew
03:28
created
src/ImageOptimize.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         Event::on(
199 199
             CraftVariable::class,
200 200
             CraftVariable::EVENT_INIT,
201
-            function (Event $event) {
201
+            function(Event $event) {
202 202
                 /** @var CraftVariable $variable */
203 203
                 $variable = $event->sender;
204 204
                 $variable->set('imageOptimize', ImageOptimizeVariable::class);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         Event::on(
210 210
             Fields::class,
211 211
             Fields::EVENT_REGISTER_FIELD_TYPES,
212
-            function (RegisterComponentTypesEvent $event) {
212
+            function(RegisterComponentTypesEvent $event) {
213 213
                 Craft::debug(
214 214
                     'Fields::EVENT_REGISTER_FIELD_TYPES',
215 215
                     __METHOD__
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         Event::on(
240 240
             Assets::class,
241 241
             Assets::EVENT_GET_ASSET_URL,
242
-            function (GetAssetUrlEvent $event) {
242
+            function(GetAssetUrlEvent $event) {
243 243
                 Craft::debug(
244 244
                     'Assets::EVENT_GET_ASSET_URL',
245 245
                     __METHOD__
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         Event::on(
256 256
             AssetTransforms::class,
257 257
             AssetTransforms::EVENT_GENERATE_TRANSFORM,
258
-            function (GenerateTransformEvent $event) {
258
+            function(GenerateTransformEvent $event) {
259 259
                 Craft::debug(
260 260
                     'AssetTransforms::EVENT_GENERATE_TRANSFORM',
261 261
                     __METHOD__
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         Event::on(
272 272
             AssetTransforms::class,
273 273
             AssetTransforms::EVENT_AFTER_DELETE_TRANSFORMS,
274
-            function (AssetTransformImageEvent $event) {
274
+            function(AssetTransformImageEvent $event) {
275 275
                 Craft::debug(
276 276
                     'AssetTransforms::EVENT_AFTER_DELETE_TRANSFORMS',
277 277
                     __METHOD__
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         Event::on(
288 288
             Assets::class,
289 289
             Assets::EVENT_BEFORE_REPLACE_ASSET,
290
-            function (ReplaceAssetEvent $event) {
290
+            function(ReplaceAssetEvent $event) {
291 291
                 Craft::debug(
292 292
                     'Assets::EVENT_BEFORE_REPLACE_ASSET',
293 293
                     __METHOD__
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
         Event::on(
310 310
             Assets::class,
311 311
             Assets::EVENT_AFTER_REPLACE_ASSET,
312
-            function (ReplaceAssetEvent $event) {
312
+            function(ReplaceAssetEvent $event) {
313 313
                 Craft::debug(
314 314
                     'Assets::EVENT_AFTER_REPLACE_ASSET',
315 315
                     __METHOD__
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         Event::on(
333 333
             Assets::class,
334 334
             Elements::EVENT_BEFORE_SAVE_ELEMENT,
335
-            function (ElementEvent $event) {
335
+            function(ElementEvent $event) {
336 336
                 Craft::debug(
337 337
                     'Elements::EVENT_BEFORE_SAVE_ELEMENT',
338 338
                     __METHOD__
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
         Event::on(
357 357
             Asset::class,
358 358
             Elements::EVENT_BEFORE_DELETE_ELEMENT,
359
-            function (ElementEvent $event) {
359
+            function(ElementEvent $event) {
360 360
                 Craft::debug(
361 361
                     'Elements::EVENT_BEFORE_DELETE_ELEMENT',
362 362
                     __METHOD__
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
         Event::on(
386 386
             Fields::class,
387 387
             Fields::EVENT_AFTER_SAVE_FIELD,
388
-            function (FieldEvent $event) {
388
+            function(FieldEvent $event) {
389 389
                 Craft::debug(
390 390
                     'Fields::EVENT_AFTER_SAVE_FIELD',
391 391
                     __METHOD__
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         Event::on(
403 403
             Plugins::class,
404 404
             Plugins::EVENT_AFTER_SAVE_PLUGIN_SETTINGS,
405
-            function (PluginEvent $event) {
405
+            function(PluginEvent $event) {
406 406
                 if ($event->plugin === $this) {
407 407
                     Craft::debug(
408 408
                         'Plugins::EVENT_AFTER_SAVE_PLUGIN_SETTINGS',
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
         Event::on(
422 422
             Volumes::class,
423 423
             Volumes::EVENT_AFTER_SAVE_VOLUME,
424
-            function (VolumeEvent $event) {
424
+            function(VolumeEvent $event) {
425 425
                 Craft::debug(
426 426
                     'Volumes::EVENT_AFTER_SAVE_VOLUME',
427 427
                     __METHOD__
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
         Event::on(
443 443
             Plugins::class,
444 444
             Plugins::EVENT_AFTER_INSTALL_PLUGIN,
445
-            function (PluginEvent $event) {
445
+            function(PluginEvent $event) {
446 446
                 if ($event->plugin === $this) {
447 447
                     $request = Craft::$app->getRequest();
448 448
                     if ($request->isCpRequest) {
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
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
      */
368 368
     public function getPlaceholderImage(): string
369 369
     {
370
-        return (string)$this->placeholderImage();
370
+        return (string) $this->placeholderImage();
371 371
     }
372 372
 
373 373
     /**
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
      */
405 405
     public function getPlaceholderBox(string $color = null): string
406 406
     {
407
-        return (string)$this->placeholderBox($color);
407
+        return (string) $this->placeholderBox($color);
408 408
     }
409 409
 
410 410
     /**
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
      */
446 446
     public function getPlaceholderSilhouette(): string
447 447
     {
448
-        return (string)$this->placeholderSilhouette();
448
+        return (string) $this->placeholderSilhouette();
449 449
     }
450 450
 
451 451
     /**
@@ -557,10 +557,10 @@  discard block
 block discarded – undo
557 557
         foreach ($array as $key => $value) {
558 558
             if ($dpr) {
559 559
                 $descriptor = '1x';
560
-                if (!empty($array[(int)$key / 2])) {
560
+                if (!empty($array[(int) $key / 2])) {
561 561
                     $descriptor = '2x';
562 562
                 }
563
-                if (!empty($array[(int)$key / 3])) {
563
+                if (!empty($array[(int) $key / 3])) {
564 564
                     $descriptor = '3x';
565 565
                 }
566 566
             } else {
Please login to merge, or discard this patch.