@@ -118,7 +118,7 @@ |
||
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, |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | . "style='background:$color' " |
67 | 67 | . "/>"; |
68 | 68 | |
69 | - return $header . ImageOptimize::$plugin->optimizedImages->encodeOptimizedSVGDataUri($content); |
|
69 | + return $header.ImageOptimize::$plugin->optimizedImages->encodeOptimizedSVGDataUri($content); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -244,14 +244,14 @@ discard block |
||
244 | 244 | $config->preserveExifData = $oldPreserveExifData; |
245 | 245 | |
246 | 246 | // Save the image out to a temp file, then return its contents |
247 | - $tempFilename = uniqid(pathinfo($pathParts['filename'], PATHINFO_FILENAME), true) . '.' . 'jpg'; |
|
248 | - $tempPath = Craft::$app->getPath()->getTempPath() . DIRECTORY_SEPARATOR . $tempFilename; |
|
247 | + $tempFilename = uniqid(pathinfo($pathParts['filename'], PATHINFO_FILENAME), true).'.'.'jpg'; |
|
248 | + $tempPath = Craft::$app->getPath()->getTempPath().DIRECTORY_SEPARATOR.$tempFilename; |
|
249 | 249 | clearstatcache(true, $tempPath); |
250 | 250 | try { |
251 | 251 | $image->saveAs($tempPath); |
252 | 252 | } catch (ImageException $e) { |
253 | 253 | Craft::error( |
254 | - 'Error saving temporary image: ' . $e->getMessage(), |
|
254 | + 'Error saving temporary image: '.$e->getMessage(), |
|
255 | 255 | __METHOD__ |
256 | 256 | ); |
257 | 257 | } |
@@ -53,8 +53,8 @@ |
||
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 |
@@ -290,7 +290,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -181,12 +181,12 @@ discard block |
||
181 | 181 | |
182 | 182 | public function __construct() |
183 | 183 | { |
184 | - $this->info = (object)$this->info; |
|
184 | + $this->info = (object) $this->info; |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | public function setParameter($data) |
188 | 188 | { |
189 | - $this->info = (object)array_merge((array)$this->info, $data); |
|
189 | + $this->info = (object) array_merge((array) $this->info, $data); |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | public function loadImageFromFile($file) |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $bm1 = clone $bm; |
216 | 216 | $currentPoint = new Point(0, 0); |
217 | 217 | |
218 | - $findNext = function ($point) use ($bm1) { |
|
218 | + $findNext = function($point) use ($bm1) { |
|
219 | 219 | $i = $bm1->w * $point->y + $point->x; |
220 | 220 | while ($i < $bm1->size && $bm1->data[$i] !== 1) { |
221 | 221 | $i++; |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | return 0; |
228 | 228 | }; |
229 | 229 | |
230 | - $majority = function ($x, $y) use ($bm1) { |
|
230 | + $majority = function($x, $y) use ($bm1) { |
|
231 | 231 | for ($i = 2; $i < 5; $i++) { |
232 | 232 | $ct = 0; |
233 | 233 | for ($a = -$i + 1; $a <= $i - 1; $a++) { |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | return 0; |
247 | 247 | }; |
248 | 248 | |
249 | - $findPath = function ($point) use ($bm, $bm1, $majority, $info) { |
|
249 | + $findPath = function($point) use ($bm, $bm1, $majority, $info) { |
|
250 | 250 | $path = new Path(); |
251 | 251 | $x = $point->x; |
252 | 252 | $y = $point->y; |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | return $path; |
311 | 311 | }; |
312 | 312 | |
313 | - $xorPath = function ($path) use (&$bm1) { |
|
313 | + $xorPath = function($path) use (&$bm1) { |
|
314 | 314 | $y1 = $path->pt[0]->y; |
315 | 315 | $len = $path->len; |
316 | 316 | |
@@ -344,15 +344,15 @@ discard block |
||
344 | 344 | { |
345 | 345 | $info = $this->info; |
346 | 346 | |
347 | - $mod = function ($a, $n) { |
|
347 | + $mod = function($a, $n) { |
|
348 | 348 | return $a >= $n ? $a % $n : ($a >= 0 ? $a : $n - 1 - (-1 - $a) % $n); |
349 | 349 | }; |
350 | 350 | |
351 | - $xprod = function ($p1, $p2) { |
|
351 | + $xprod = function($p1, $p2) { |
|
352 | 352 | return $p1->x * $p2->y - $p1->y * $p2->x; |
353 | 353 | }; |
354 | 354 | |
355 | - $cyclic = function ($a, $b, $c) { |
|
355 | + $cyclic = function($a, $b, $c) { |
|
356 | 356 | if ($a <= $c) { |
357 | 357 | return ($a <= $b && $b < $c); |
358 | 358 | } else { |
@@ -360,11 +360,11 @@ discard block |
||
360 | 360 | } |
361 | 361 | }; |
362 | 362 | |
363 | - $sign = function ($i) { |
|
363 | + $sign = function($i) { |
|
364 | 364 | return $i > 0 ? 1 : ($i < 0 ? -1 : 0); |
365 | 365 | }; |
366 | 366 | |
367 | - $quadform = function ($Q, $w) { |
|
367 | + $quadform = function($Q, $w) { |
|
368 | 368 | $v = array_fill(0, 3, null); |
369 | 369 | |
370 | 370 | $v[0] = $w->x; |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | return $sum; |
382 | 382 | }; |
383 | 383 | |
384 | - $interval = function ($lambda, $a, $b) { |
|
384 | + $interval = function($lambda, $a, $b) { |
|
385 | 385 | $res = new Point(); |
386 | 386 | |
387 | 387 | $res->x = $a->x + $lambda * ($b->x - $a->x); |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | return $res; |
391 | 391 | }; |
392 | 392 | |
393 | - $dorth_infty = function ($p0, $p2) use ($sign) { |
|
393 | + $dorth_infty = function($p0, $p2) use ($sign) { |
|
394 | 394 | $r = new Point(); |
395 | 395 | |
396 | 396 | $r->y = $sign($p2->x - $p0->x); |
@@ -399,13 +399,13 @@ discard block |
||
399 | 399 | return $r; |
400 | 400 | }; |
401 | 401 | |
402 | - $ddenom = function ($p0, $p2) use ($dorth_infty) { |
|
402 | + $ddenom = function($p0, $p2) use ($dorth_infty) { |
|
403 | 403 | $r = $dorth_infty($p0, $p2); |
404 | 404 | |
405 | 405 | return $r->y * ($p2->x - $p0->x) - $r->x * ($p2->y - $p0->y); |
406 | 406 | }; |
407 | 407 | |
408 | - $dpara = function ($p0, $p1, $p2) { |
|
408 | + $dpara = function($p0, $p1, $p2) { |
|
409 | 409 | $x1 = $p1->x - $p0->x; |
410 | 410 | $y1 = $p1->y - $p0->y; |
411 | 411 | $x2 = $p2->x - $p0->x; |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | return $x1 * $y2 - $x2 * $y1; |
415 | 415 | }; |
416 | 416 | |
417 | - $cprod = function ($p0, $p1, $p2, $p3) { |
|
417 | + $cprod = function($p0, $p1, $p2, $p3) { |
|
418 | 418 | $x1 = $p1->x - $p0->x; |
419 | 419 | $y1 = $p1->y - $p0->y; |
420 | 420 | $x2 = $p3->x - $p2->x; |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | return $x1 * $y2 - $x2 * $y1; |
424 | 424 | }; |
425 | 425 | |
426 | - $iprod = function ($p0, $p1, $p2) { |
|
426 | + $iprod = function($p0, $p1, $p2) { |
|
427 | 427 | $x1 = $p1->x - $p0->x; |
428 | 428 | $y1 = $p1->y - $p0->y; |
429 | 429 | $x2 = $p2->x - $p0->x; |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | return $x1 * $x2 + $y1 * $y2; |
433 | 433 | }; |
434 | 434 | |
435 | - $iprod1 = function ($p0, $p1, $p2, $p3) { |
|
435 | + $iprod1 = function($p0, $p1, $p2, $p3) { |
|
436 | 436 | $x1 = $p1->x - $p0->x; |
437 | 437 | $y1 = $p1->y - $p0->y; |
438 | 438 | $x2 = $p3->x - $p2->x; |
@@ -441,11 +441,11 @@ discard block |
||
441 | 441 | return $x1 * $x2 + $y1 * $y2; |
442 | 442 | }; |
443 | 443 | |
444 | - $ddist = function ($p, $q) { |
|
444 | + $ddist = function($p, $q) { |
|
445 | 445 | return sqrt(($p->x - $q->x) * ($p->x - $q->x) + ($p->y - $q->y) * ($p->y - $q->y)); |
446 | 446 | }; |
447 | 447 | |
448 | - $bezier = function ($t, $p0, $p1, $p2, $p3) { |
|
448 | + $bezier = function($t, $p0, $p1, $p2, $p3) { |
|
449 | 449 | $s = 1 - $t; |
450 | 450 | $res = new Point(); |
451 | 451 | |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | return $res; |
456 | 456 | }; |
457 | 457 | |
458 | - $tangent = function ($p0, $p1, $p2, $p3, $q0, $q1) use ($cprod) { |
|
458 | + $tangent = function($p0, $p1, $p2, $p3, $q0, $q1) use ($cprod) { |
|
459 | 459 | $A = $cprod($p0, $p1, $q0, $q1); |
460 | 460 | $B = $cprod($p1, $p2, $q0, $q1); |
461 | 461 | $C = $cprod($p2, $p3, $q0, $q1); |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | } |
487 | 487 | }; |
488 | 488 | |
489 | - $calcSums = function (&$path) { |
|
489 | + $calcSums = function(&$path) { |
|
490 | 490 | $path->x0 = $path->pt[0]->x; |
491 | 491 | $path->y0 = $path->pt[0]->y; |
492 | 492 | |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | } |
502 | 502 | }; |
503 | 503 | |
504 | - $calcLon = function (&$path) use ($mod, $xprod, $sign, $cyclic) { |
|
504 | + $calcLon = function(&$path) use ($mod, $xprod, $sign, $cyclic) { |
|
505 | 505 | $n = $path->len; |
506 | 506 | $pt = &$path->pt; |
507 | 507 | $pivk = array_fill(0, $n, null); |
@@ -612,9 +612,9 @@ discard block |
||
612 | 612 | } |
613 | 613 | }; |
614 | 614 | |
615 | - $bestPolygon = function (&$path) use ($mod) { |
|
615 | + $bestPolygon = function(&$path) use ($mod) { |
|
616 | 616 | |
617 | - $penalty3 = function ($path, $i, $j) { |
|
617 | + $penalty3 = function($path, $i, $j) { |
|
618 | 618 | $n = $path->len; |
619 | 619 | $pt = $path->pt; |
620 | 620 | $sums = $path->sums; |
@@ -720,9 +720,9 @@ discard block |
||
720 | 720 | } |
721 | 721 | }; |
722 | 722 | |
723 | - $adjustVertices = function (&$path) use ($mod, $quadform) { |
|
723 | + $adjustVertices = function(&$path) use ($mod, $quadform) { |
|
724 | 724 | |
725 | - $pointslope = function ($path, $i, $j, &$ctr, &$dir) { |
|
725 | + $pointslope = function($path, $i, $j, &$ctr, &$dir) { |
|
726 | 726 | |
727 | 727 | $n = $path->len; |
728 | 728 | $sums = $path->sums; |
@@ -927,7 +927,7 @@ discard block |
||
927 | 927 | } |
928 | 928 | }; |
929 | 929 | |
930 | - $reverse = function (&$path) { |
|
930 | + $reverse = function(&$path) { |
|
931 | 931 | $curve = &$path->curve; |
932 | 932 | $m = $curve->n; |
933 | 933 | $v = &$curve->vertex; |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | } |
940 | 940 | }; |
941 | 941 | |
942 | - $smooth = function (&$path) use ($mod, $interval, $ddenom, $dpara, $info) { |
|
942 | + $smooth = function(&$path) use ($mod, $interval, $ddenom, $dpara, $info) { |
|
943 | 943 | $m = $path->curve->n; |
944 | 944 | $curve = &$path->curve; |
945 | 945 | |
@@ -982,8 +982,8 @@ discard block |
||
982 | 982 | $curve->alphacurve = 1; |
983 | 983 | }; |
984 | 984 | |
985 | - $optiCurve = function (&$path) use ($mod, $ddist, $sign, $cprod, $dpara, $interval, $tangent, $bezier, $iprod, $iprod1, $info) { |
|
986 | - $opti_penalty = function ($path, $i, $j, $res, $opttolerance, $convc, $areac) use ($mod, $ddist, $sign, $cprod, $dpara, $interval, $tangent, $bezier, $iprod, $iprod1) { |
|
985 | + $optiCurve = function(&$path) use ($mod, $ddist, $sign, $cprod, $dpara, $interval, $tangent, $bezier, $iprod, $iprod1, $info) { |
|
986 | + $opti_penalty = function($path, $i, $j, $res, $opttolerance, $convc, $areac) use ($mod, $ddist, $sign, $cprod, $dpara, $interval, $tangent, $bezier, $iprod, $iprod1) { |
|
987 | 987 | $m = $path->curve->n; |
988 | 988 | $curve = $path->curve; |
989 | 989 | $vertex = $curve->vertex; |
@@ -1249,31 +1249,31 @@ discard block |
||
1249 | 1249 | { |
1250 | 1250 | $bm = &$this->bm; |
1251 | 1251 | $pathlist = &$this->pathlist; |
1252 | - $path = function ($curve) use ($size) { |
|
1252 | + $path = function($curve) use ($size) { |
|
1253 | 1253 | |
1254 | - $bezier = function ($i) use ($curve, $size) { |
|
1255 | - $b = 'C ' . number_format($curve->c[$i * 3 + 0]->x * $size, 3) . ' ' . |
|
1256 | - number_format($curve->c[$i * 3 + 0]->y * $size, 3) . ','; |
|
1257 | - $b .= number_format($curve->c[$i * 3 + 1]->x * $size, 3) . ' ' . |
|
1258 | - number_format($curve->c[$i * 3 + 1]->y * $size, 3) . ','; |
|
1259 | - $b .= number_format($curve->c[$i * 3 + 2]->x * $size, 3) . ' ' . |
|
1260 | - number_format($curve->c[$i * 3 + 2]->y * $size, 3) . ' '; |
|
1254 | + $bezier = function($i) use ($curve, $size) { |
|
1255 | + $b = 'C '.number_format($curve->c[$i * 3 + 0]->x * $size, 3).' '. |
|
1256 | + number_format($curve->c[$i * 3 + 0]->y * $size, 3).','; |
|
1257 | + $b .= number_format($curve->c[$i * 3 + 1]->x * $size, 3).' '. |
|
1258 | + number_format($curve->c[$i * 3 + 1]->y * $size, 3).','; |
|
1259 | + $b .= number_format($curve->c[$i * 3 + 2]->x * $size, 3).' '. |
|
1260 | + number_format($curve->c[$i * 3 + 2]->y * $size, 3).' '; |
|
1261 | 1261 | |
1262 | 1262 | return $b; |
1263 | 1263 | }; |
1264 | 1264 | |
1265 | - $segment = function ($i) use ($curve, $size) { |
|
1266 | - $s = 'L ' . number_format($curve->c[$i * 3 + 1]->x * $size, 3) . ' ' . |
|
1267 | - number_format($curve->c[$i * 3 + 1]->y * $size, 3) . ' '; |
|
1268 | - $s .= number_format($curve->c[$i * 3 + 2]->x * $size, 3) . ' ' . |
|
1269 | - number_format($curve->c[$i * 3 + 2]->y * $size, 3) . ' '; |
|
1265 | + $segment = function($i) use ($curve, $size) { |
|
1266 | + $s = 'L '.number_format($curve->c[$i * 3 + 1]->x * $size, 3).' '. |
|
1267 | + number_format($curve->c[$i * 3 + 1]->y * $size, 3).' '; |
|
1268 | + $s .= number_format($curve->c[$i * 3 + 2]->x * $size, 3).' '. |
|
1269 | + number_format($curve->c[$i * 3 + 2]->y * $size, 3).' '; |
|
1270 | 1270 | |
1271 | 1271 | return $s; |
1272 | 1272 | }; |
1273 | 1273 | |
1274 | 1274 | $n = $curve->n; |
1275 | - $p = 'M' . number_format($curve->c[($n - 1) * 3 + 2]->x * $size, 3) . |
|
1276 | - ' ' . number_format($curve->c[($n - 1) * 3 + 2]->y * $size, 3) . ' '; |
|
1275 | + $p = 'M'.number_format($curve->c[($n - 1) * 3 + 2]->x * $size, 3). |
|
1276 | + ' '.number_format($curve->c[($n - 1) * 3 + 2]->y * $size, 3).' '; |
|
1277 | 1277 | |
1278 | 1278 | for ($i = 0; $i < $n; $i++) { |
1279 | 1279 | if ($curve->tag[$i] === "CURVE") { |
@@ -1292,9 +1292,9 @@ discard block |
||
1292 | 1292 | $len = count($pathlist); |
1293 | 1293 | |
1294 | 1294 | $svg = '<svg id="svg" version="1.1"' |
1295 | - . ' width="' . $w . '"' |
|
1296 | - . ' height="' . $h . '"' |
|
1297 | - . ' style="background-color: ' .$bgColor . '"' |
|
1295 | + . ' width="'.$w.'"' |
|
1296 | + . ' height="'.$h.'"' |
|
1297 | + . ' style="background-color: '.$bgColor.'"' |
|
1298 | 1298 | . ' xmlns="http://www.w3.org/2000/svg">'; |
1299 | 1299 | $svg .= '<path d="'; |
1300 | 1300 | for ($i = 0; $i < $len; $i++) { |
@@ -1310,7 +1310,7 @@ discard block |
||
1310 | 1310 | $fillc = $fgColor; |
1311 | 1311 | $fillrule = ' fill-rule="evenodd"'; |
1312 | 1312 | } |
1313 | - $svg .= '" stroke="' . $strokec . '" fill="' . $fillc . '"' . $fillrule . '/></svg>'; |
|
1313 | + $svg .= '" stroke="'.$strokec.'" fill="'.$fillc.'"'.$fillrule.'/></svg>'; |
|
1314 | 1314 | |
1315 | 1315 | return $svg; |
1316 | 1316 | } |
@@ -112,7 +112,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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)) { |