Completed
Push — master ( c12d0a...30a01b )
by cam
31:59
created
ecrire/inc/filtres_images_mini.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
 	$hsl = _couleur_hex_to_hsl($couleur);
205 205
 	$hsl = [
206 206
 		'h' => round($hsl['h'] * 360), 
207
-		's' => round($hsl['s'] * 100) . '%', 
208
-		'l' => round($hsl['l'] * 100) . '%'
207
+		's' => round($hsl['s'] * 100).'%', 
208
+		'l' => round($hsl['l'] * 100).'%'
209 209
 	];
210 210
 	if ($format === null) {
211 211
 		return "hsl({$hsl['h']}, {$hsl['s']}, {$hsl['l']})";
@@ -384,11 +384,11 @@  discard block
 block discarded – undo
384 384
 	$process = 'AUTO'
385 385
 ) {
386 386
 	// PHP 7+ type hint
387
-	$img = (string)$img;
388
-	$taille_x = (int)$taille_x;
389
-	$taille_y = (int)$taille_y;
390
-	$force = (bool)$force;
391
-	$process = (string)$process;
387
+	$img = (string) $img;
388
+	$taille_x = (int) $taille_x;
389
+	$taille_y = (int) $taille_y;
390
+	$force = (bool) $force;
391
+	$process = (string) $process;
392 392
 
393 393
 	if (!$img) {
394 394
 		return '';
@@ -465,11 +465,11 @@  discard block
 block discarded – undo
465 465
 	$process = 'AUTO'
466 466
 ) {
467 467
 	// PHP 7+ type hint
468
-	$img = (string)$img;
469
-	$taille = (int)$taille;
470
-	$taille_y = (int)$taille_y;
471
-	$force = (bool)$force;
472
-	$process = (string)$process;
468
+	$img = (string) $img;
469
+	$taille = (int) $taille;
470
+	$taille_y = (int) $taille_y;
471
+	$force = (bool) $force;
472
+	$process = (string) $process;
473 473
 
474 474
 	// Determiner la taille x,y maxi
475 475
 	// prendre le reglage de previsu par defaut
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
  * sinon retourne le image_passe_partout usuel
505 505
  * 
506 506
  **/
507
-function image_recadre_avec_fallback (
507
+function image_recadre_avec_fallback(
508 508
 	$im,
509 509
 	$width,
510 510
 	$height = '-',
@@ -533,9 +533,9 @@  discard block
 block discarded – undo
533 533
  **/
534 534
 function image_reduire_par($img, $val = 1, $force = false) {
535 535
 	// PHP 7+ type hint
536
-	$img = (string)$img;
537
-	$val = (int)$val;
538
-	$force = (bool)$force;
536
+	$img = (string) $img;
537
+	$val = (int) $val;
538
+	$force = (bool) $force;
539 539
 
540 540
 	list($hauteur, $largeur) = taille_image($img);
541 541
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -511,11 +511,12 @@
 block discarded – undo
511 511
 	$position = 'focus',
512 512
 	$background_color = 'white'
513 513
 ) {
514
-	if (function_exists('image_recadre') && ($GLOBALS['meta']['image_process'] ?? '') === 'gd2')
515
-		return image_reduire(image_recadre($im, $width.':'.$height, '-', $position, $background_color), $width, $height);
516
-	else 
517
-		return image_passe_partout($im, $width, $height);
518
-}
514
+	if (function_exists('image_recadre') && ($GLOBALS['meta']['image_process'] ?? '') === 'gd2') {
515
+			return image_reduire(image_recadre($im, $width.':'.$height, '-', $position, $background_color), $width, $height);
516
+	} else {
517
+			return image_passe_partout($im, $width, $height);
518
+	}
519
+	}
519 520
 
520 521
 /**
521 522
  * Réduit les images d'un certain facteur
Please login to merge, or discard this patch.