Completed
Push — master ( 7f3c39...d78940 )
by cam
04:49
created
ecrire/public/sandbox.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
  *     Texte
42 42
  */
43 43
 function sandbox_composer_texte($texte, &$p) {
44
-	$code = "'" . str_replace(array("\\", "'"), array("\\\\", "\\'"), $texte) . "'";
44
+	$code = "'".str_replace(array("\\", "'"), array("\\\\", "\\'"), $texte)."'";
45 45
 
46 46
 	return $code;
47 47
 }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
  *     Balise qui appelle ce filtre
59 59
  * @return string
60 60
  */
61
-function sandbox_composer_filtre($fonc, $code, $arglist, &$p, $nb_arg_droite=1000) : string {
61
+function sandbox_composer_filtre($fonc, $code, $arglist, &$p, $nb_arg_droite = 1000) : string {
62 62
 	if (isset($GLOBALS['spip_matrice'][$fonc])) {
63 63
 		$code = "filtrer('$fonc',$code$arglist)";
64 64
 	}
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
 			$code = "$f($code$arglist)";
83 83
 			$nb_arg_gauche = 1; // la balise à laquelle s'applique le filtre
84 84
 		}
85
-		$nb_args_f = $nb_arg_gauche+$nb_arg_droite;
85
+		$nb_args_f = $nb_arg_gauche + $nb_arg_droite;
86 86
 		$min_f = $refl->getNumberOfRequiredParameters();
87 87
 		if (($nb_args_f < $min_f)) {
88
-			$msg_args = ['filtre' => texte_script ($fonc), 'nb'=> $min_f - $nb_args_f];
89
-			erreur_squelette ([ 'zbug_erreur_filtre_nbarg_min', $msg_args], $p);
88
+			$msg_args = ['filtre' => texte_script($fonc), 'nb'=> $min_f - $nb_args_f];
89
+			erreur_squelette(['zbug_erreur_filtre_nbarg_min', $msg_args], $p);
90 90
 		}
91 91
 	}
92 92
 	// le filtre n'existe pas,
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
  */
172 172
 function sandbox_filtrer_squelette($skel, $corps, $filtres) {
173 173
 	$series_filtres = func_get_args();
174
-	array_shift($series_filtres);// skel
175
-	array_shift($series_filtres);// corps
174
+	array_shift($series_filtres); // skel
175
+	array_shift($series_filtres); // corps
176 176
 
177 177
 	// proteger les <INCLUDE> et tous les morceaux de php licites
178 178
 	if ($skel['process_ins'] == 'php') {
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 	if (is_array($r)) {
221 221
 		$dst[] = $r[0];
222 222
 
223
-		return $src[] = '___' . md5($r[0]) . '___';
223
+		return $src[] = '___'.md5($r[0]).'___';
224 224
 	}
225 225
 
226 226
 	// si on recoit pas un tableau, on renvoit les couples de substitution
Please login to merge, or discard this patch.