Completed
Push — master ( 11381c...fc67b6 )
by cam
01:49
created
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.
ecrire/tests/Template/Loader/StringLoader.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,33 +23,33 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	public function getCacheKey(string $name): string {
26
-		return md5($name . serialize($this->options));
26
+		return md5($name.serialize($this->options));
27 27
 	}
28 28
 
29 29
 	/**
30 30
 	 * Écrit le code du squelette dans un fichier temporaire de cache
31 31
 	 */
32 32
 	public function getSourceFile(string $name): string {
33
-		$fond = $this->cacheDirectory . $this->getCacheKey($name);
33
+		$fond = $this->cacheDirectory.$this->getCacheKey($name);
34 34
 		$options = $this->options;
35 35
 		$code = $name;
36 36
 
37 37
 		if (isset($options['avant_code'])) {
38
-			$code = $options['avant_code'] . $code;
38
+			$code = $options['avant_code'].$code;
39 39
 		}
40 40
 
41 41
 		if (isset($options['apres_code'])) {
42 42
 			$code .= $options['apres_code'];
43 43
 		}
44 44
 
45
-		$this->ecrire_fichier($fond . '.html', $code);
45
+		$this->ecrire_fichier($fond.'.html', $code);
46 46
 
47 47
 		if (!empty($options['fonctions'])) {
48 48
 			// un fichier unique pour ces fonctions
49
-			$func = $this->cacheDirectory . 'func_' . md5($options['fonctions']) . '.php';
49
+			$func = $this->cacheDirectory.'func_'.md5($options['fonctions']).'.php';
50 50
 			$this->ecrire_fichier($func, $this->php($options['fonctions']));
51 51
 			// une inclusion unique de ces fichiers
52
-			$this->ecrire_fichier($fond . '_fonctions.php', $this->php(sprintf('include_once(\'%s\');', $func)));
52
+			$this->ecrire_fichier($fond.'_fonctions.php', $this->php(sprintf('include_once(\'%s\');', $func)));
53 53
 		}
54 54
 
55 55
 		return $fond;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	 * @return string Code php complet
79 79
 	 */
80 80
 	private function php(string $code): string {
81
-		return '<' . "?php\n" . $code . "\n?" . '>';
81
+		return '<'."?php\n".$code."\n?".'>';
82 82
 	}
83 83
 
84 84
 	/**
Please login to merge, or discard this patch.
ecrire/tests/Typographie/FrTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	public static function setUpBeforeClass(): void {
29 29
 		include_spip('inc/texte');
30 30
 		changer_langue(static::$lang);
31
-		include_spip(static::$root . 'typographie/' . static::$lang);
31
+		include_spip(static::$root.'typographie/'.static::$lang);
32 32
 	}
33 33
 
34 34
 	public static function providerBase() {
Please login to merge, or discard this patch.
ecrire/tests/Typographie/NotesTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 		$expected = '<p>a<span class="spip_note_ref">&nbsp;[<a href="#nb1" class="spip_note" rel="appendix" title="b" id="nh1">1</a>]</span></p>';
22 22
 		$this->assertEquals($expected, propre('a[[b]]'));
23 23
 
24
-		$expected = "<div id=\"nb1\">\n<p><span class=\"spip_note_ref\">[<a href=\"#nh1\" class=\"spip_note\" title=\"" . _T('info_notes') . " 1\" rev=\"appendix\">1</a>]&nbsp;</span>b</p>\n</div>";
24
+		$expected = "<div id=\"nb1\">\n<p><span class=\"spip_note_ref\">[<a href=\"#nh1\" class=\"spip_note\" title=\""._T('info_notes')." 1\" rev=\"appendix\">1</a>]&nbsp;</span>b</p>\n</div>";
25 25
 		$this->assertEquals($expected, calculer_notes());
26 26
 	}
27 27
 
Please login to merge, or discard this patch.