Completed
Push — master ( ffbbca...ad9227 )
by cam
01:32
created
ecrire/src/ErrorHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
 		array_shift($backtrace);
28 28
 		do {
29 29
 			$t = array_shift($backtrace);
30
-			$fqdn = ($t['class'] ?? '') . ($t['type'] ?? '') . ($t['function'] ?? '');
30
+			$fqdn = ($t['class'] ?? '').($t['type'] ?? '').($t['function'] ?? '');
31 31
 		} while (in_array($fqdn, ['trigger_error', 'trigger_deprecation']));
32 32
 
33 33
 		$errfile = $t['file'];
34 34
 		$errline = $t['line'];
35 35
 
36
-		spip_log(sprintf('%s in %s on line %s', $errstr, $errfile, $errline), 'deprecated.' . _LOG_INFO);
36
+		spip_log(sprintf('%s in %s on line %s', $errstr, $errfile, $errline), 'deprecated.'._LOG_INFO);
37 37
 		return false;
38 38
 	}
39 39
 }
Please login to merge, or discard this patch.
ecrire/src/Texte/Collecteur/HtmlTag.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
 		}
52 52
 
53 53
 		$upperTag = strtoupper($this->tag);
54
-		$hasUpperCaseTags = ($upperTag !== $this->tag && (str_contains($texte, '<' . $upperTag) || str_contains($texte, '</' . $upperTag)));
54
+		$hasUpperCaseTags = ($upperTag !== $this->tag && (str_contains($texte, '<'.$upperTag) || str_contains($texte, '</'.$upperTag)));
55 55
 
56 56
 		// collecter les balises ouvrantes
57
-		$opening = static::collecteur($texte, '', $hasUpperCaseTags ? '<' : '<' . $this->tag, $this->preg_openingtag, empty($options['detecter_presence']) ? 0 : 1);
57
+		$opening = static::collecteur($texte, '', $hasUpperCaseTags ? '<' : '<'.$this->tag, $this->preg_openingtag, empty($options['detecter_presence']) ? 0 : 1);
58 58
 		if (!$opening) {
59 59
 			return [];
60 60
 		}
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		}
66 66
 
67 67
 		// collecter les balises fermantes
68
-		$closing = static::collecteur($texte, '', $hasUpperCaseTags ? '</' : '</' . $this->tag, $this->preg_closingtag);
68
+		$closing = static::collecteur($texte, '', $hasUpperCaseTags ? '</' : '</'.$this->tag, $this->preg_closingtag);
69 69
 
70 70
 		$profondeur = ($options['profondeur'] ?? 1);
71 71
 		$tags = [];
@@ -183,12 +183,12 @@  discard block
 block discarded – undo
183 183
 			// et on aura pas non plus de innerHtml si pas de preg_closingtag
184 184
 			if ($this->preg_closingtag) {
185 185
 				$tag = $this->tag;
186
-				$legacy_callback = function ($c, $options) use ($tag, $callback_function) {
186
+				$legacy_callback = function($c, $options) use ($tag, $callback_function) {
187 187
 					// legacy : renseigner les infos correspondantes aux matchs de l'ancienne regexp
188 188
 					$regs = [
189 189
 						0 => $c['raw'],
190 190
 						1 => $tag,
191
-						2 => $c['match'][1] . $c['match'][2],
191
+						2 => $c['match'][1].$c['match'][2],
192 192
 						3 => $c['innerHtml'],
193 193
 						'tag' => $this->tag,
194 194
 					] + $c;
Please login to merge, or discard this patch.
ecrire/src/Texte/Collecteur/AbstractCollecteur.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
 				// generer un marqueur qui n'existe pas dans le texte
129 129
 				do {
130 130
 					$this->markId = substr(md5(uniqid(static::class, 1)), 0, 7);
131
-					$this->markId = '@|' . static::$markPrefix . $this->markId . '|';
131
+					$this->markId = '@|'.static::$markPrefix.$this->markId.'|';
132 132
 				} while (str_contains($texte, $this->markId));
133 133
 			}
134 134
 
135 135
 			$offset_pos = 0;
136 136
 			foreach ($collection as $c) {
137
-				$rempl = $this->markId . base64_encode((string) $c['raw']) . '|@';
137
+				$rempl = $this->markId.base64_encode((string) $c['raw']).'|@';
138 138
 				$texte = substr_replace($texte, $rempl, $c['pos'] + $offset_pos, $c['length']);
139 139
 				$offset_pos += strlen($rempl) - $c['length'];
140 140
 			}
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 		static $pregBalisesBloc;
180 180
 
181 181
 		if ($pregBalisesBloc === null) {
182
-			$pregBalisesBloc = ',</?(' . implode('|', static::$listeBalisesBloc) . ')[>[:space:]],iS';
182
+			$pregBalisesBloc = ',</?('.implode('|', static::$listeBalisesBloc).')[>[:space:]],iS';
183 183
 		}
184 184
 		return (str_contains($texte, '<') && preg_match($pregBalisesBloc, $texte)) ? true : false;
185 185
 	}
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 				include_spip('inc/filtres');
206 206
 			}
207 207
 			foreach ($attributs as $k => $v) {
208
-				$atts .= " $k=\"" . \attribut_html($v) . '"';
208
+				$atts .= " $k=\"".\attribut_html($v).'"';
209 209
 			}
210 210
 		}
211 211
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 			# spip_log(spip_htmlspecialchars($texte));  ## pour les curieux
236 236
 			$max_prof = 5;
237 237
 			$encore = true;
238
-			while ($encore && str_contains($texte, 'base64' . $source) && $max_prof--) {
238
+			while ($encore && str_contains($texte, 'base64'.$source) && $max_prof--) {
239 239
 				$encore = false;
240 240
 				foreach (['span', 'div'] as $tag) {
241 241
 					$htmlTagCollecteur = new HtmlTag(
Please login to merge, or discard this patch.
ecrire/src/Texte/Collecteur/Multis.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@
 block discarded – undo
204 204
 								$trad_propre = preg_replace(',(^<p[^>]*>|</p>$),Uims', '', (string) propre($trad));
205 205
 								$isBloc = self::echappementTexteContientBaliseBloc($trad_propre);
206 206
 								if ($isBloc) {
207
-									$trad = rtrim((string) $trad) . "\n\n";
207
+									$trad = rtrim((string) $trad)."\n\n";
208 208
 								}
209 209
 								$attributs = ['lang' => $l];
210 210
 								if (lang_dir($l) !== lang_dir($lang)) {
Please login to merge, or discard this patch.
ecrire/src/Compilateur/Iterateur/Factory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@
 block discarded – undo
51 51
 			// chercher la classe d'iterateur Iterateur/XXX
52 52
 			// definie dans le fichier src/Compilateur/Iterateur/xxx.php
53 53
 			// FIXME: déclarer quelque part les iterateurs supplémentaires
54
-			$class = __NAMESPACE__ . '\\' . ucfirst(strtolower((string) $iterateur));
54
+			$class = __NAMESPACE__.'\\'.ucfirst(strtolower((string) $iterateur));
55 55
 			if (!class_exists($class)) {
56 56
 				// historique
57 57
 				// Chercher IterateurXXX
58
-				include_spip('iterateur/' . strtolower($iterateur));
59
-				$class = 'Iterateur' . $iterateur;
58
+				include_spip('iterateur/'.strtolower($iterateur));
59
+				$class = 'Iterateur'.$iterateur;
60 60
 				if (!class_exists($class)) {
61 61
 					exit("Iterateur {$iterateur} non trouv&#233;");
62 62
 					// si l'iterateur n'existe pas, on se rabat sur le generique
Please login to merge, or discard this patch.
ecrire/tests/bootstrap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@
 block discarded – undo
24 24
 }
25 25
 
26 26
 if (!defined('_DIR_TESTS')) {
27
-	define('_DIR_TESTS', substr(_SPIP_TEST_INC, strlen(_SPIP_TEST_CHDIR) + 1) . '/');
27
+	define('_DIR_TESTS', substr(_SPIP_TEST_INC, strlen(_SPIP_TEST_CHDIR) + 1).'/');
28 28
 }
29 29
 
30 30
 // chdir pour charger SPIP
31 31
 chdir(_SPIP_TEST_CHDIR);
32 32
 
33
-require_once _SPIP_TEST_CHDIR . '/ecrire/inc_version.php';
33
+require_once _SPIP_TEST_CHDIR.'/ecrire/inc_version.php';
34 34
 
35 35
 // pour notice sur recuperer_fond()
36 36
 if (!isset($GLOBALS['spip_lang'])) {
Please login to merge, or discard this patch.
ecrire/tests/Action/EditerLiensTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
 		foreach ($essais as $k => $essai) {
57 57
 			$expected = array_shift($essai);
58
-			$this->assertEquals($expected, objet_associable(...$essai), "Echec {$k} : objet_associable " . end($essai));
58
+			$this->assertEquals($expected, objet_associable(...$essai), "Echec {$k} : objet_associable ".end($essai));
59 59
 		}
60 60
 	}
61 61
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 			$this->assertEquals(
133 133
 				$expected,
134 134
 				objet_associer(...$essai),
135
-				"Echec {$k} : objet_associer " . json_encode($essai, JSON_THROW_ON_ERROR)
135
+				"Echec {$k} : objet_associer ".json_encode($essai, JSON_THROW_ON_ERROR)
136 136
 			);
137 137
 		}
138 138
 	}
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 			$this->assertEquals(
208 208
 				$expected,
209 209
 				objet_qualifier_liens(...$essai),
210
-				"Echec {$k} : objet_qualifier_liens " . json_encode($essai, JSON_THROW_ON_ERROR)
210
+				"Echec {$k} : objet_qualifier_liens ".json_encode($essai, JSON_THROW_ON_ERROR)
211 211
 			);
212 212
 		}
213 213
 	}
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 			$this->assertEquals(
288 288
 				$expected,
289 289
 				objet_dissocier(...$essai),
290
-				"Echec {$k} : objet_dissocier " . json_encode($essai, JSON_THROW_ON_ERROR)
290
+				"Echec {$k} : objet_dissocier ".json_encode($essai, JSON_THROW_ON_ERROR)
291 291
 			);
292 292
 		}
293 293
 	}
Please login to merge, or discard this patch.
ecrire/tests/Propre/EchappeHtmlTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 			$args[1] ?? '',
49 49
 			$args[2] ?? false,
50 50
 			$args[3] ?? '',
51
-			__NAMESPACE__ . '\\callback_test_propre_echappe_html_'
51
+			__NAMESPACE__.'\\callback_test_propre_echappe_html_'
52 52
 		);
53 53
 		$this->assertSame($expected, $actual);
54 54
 
@@ -83,16 +83,16 @@  discard block
 block discarded – undo
83 83
 			foreach ($attrs as $attr) {
84 84
 				$cpt = 1;
85 85
 				foreach ($insides as $inside) {
86
-					$html = "<{$balise}" . ($attr ? " $attr" : '') . ">$inside</$balise>";
86
+					$html = "<{$balise}".($attr ? " $attr" : '').">$inside</$balise>";
87 87
 					$code_echappe = \code_echappement($html, $source, $no_transform);
88 88
 					foreach ($befores as $before) {
89 89
 						foreach ($afters as $after) {
90
-							$texte = $before . $html . $after;
90
+							$texte = $before.$html.$after;
91 91
 							foreach ($pregs as $preg) {
92 92
 								// si preg vide et pas balise svg OU si preg ET balise SVG on attend un echappement
93 93
 								// sinon on attends le texte d'origine
94 94
 								if ($preg ? $balise === 'svg' : $balise !== 'svg') {
95
-									$expected = $before . $code_echappe . $after;
95
+									$expected = $before.$code_echappe.$after;
96 96
 								} else {
97 97
 									$expected = $texte;
98 98
 								}
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 			$args[1] ?? '',
116 116
 			$args[2] ?? false,
117 117
 			$args[3] ?? '',
118
-			__NAMESPACE__ . '\\callback_test_propre_echappe_html_'
118
+			__NAMESPACE__.'\\callback_test_propre_echappe_html_'
119 119
 		);
120 120
 		$this->assertSame($expected, $actual);
121 121
 	}
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		$essais = [];
125 125
 		$marque = '<span class="base64" title="QQ=="></span>';
126 126
 		$essais['simple imbriqué'] = [
127
-			'avant 1' . $marque . 'apres 1</code>apres 2',
127
+			'avant 1'.$marque.'apres 1</code>apres 2',
128 128
 			'avant 1<code class="php"> avant 2<code>le code</code>apres 1</code>apres 2',
129 129
 		];
130 130
 		$essais['complexe imbriqué'] = [
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 			'astuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolosastuce & travaux de mode rigolos',
183 183
 		];
184 184
 		$essais['code sans imbrication'] = [
185
-			'avant 1' . $marque . 'apres 2',
185
+			'avant 1'.$marque.'apres 2',
186 186
 			'avant 1<code class="php"> avant 2 code le code code apres 1</code>apres 2',
187 187
 		];
188 188
 		$essais['pourriture'] = [
Please login to merge, or discard this patch.
ecrire/tests/Template/Loader/FileLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 		}
31 31
 
32 32
 		$desc = pathinfo($name);
33
-		$fond = $desc['dirname'] . '/' . $desc['filename'];
33
+		$fond = $desc['dirname'].'/'.$desc['filename'];
34 34
 
35 35
 		return substr($fond, $this->rootLen);
36 36
 	}
Please login to merge, or discard this patch.