Completed
Push — master ( 6c1ed5...22fbb1 )
by cam
02:28
created
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.
ecrire/tests/Filtre/Form/FormHiddenCase.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -65,50 +65,50 @@  discard block
 block discarded – undo
65 65
 		return [
66 66
 			0 =>
67 67
 			[
68
-				0 => '<input name="id_rubrique" value="' . $id . '" type="hidden"
68
+				0 => '<input name="id_rubrique" value="'.$id.'" type="hidden"
69 69
 /><input name="page" value="rubrique" type="hidden"
70 70
 />',
71
-				1 => './?rubrique' . $id,
71
+				1 => './?rubrique'.$id,
72 72
 			],
73 73
 			1 =>
74 74
 			[
75 75
 				0 => '<input name="calendrier" value="1" type="hidden"
76
-/><input name="id_rubrique" value="' . $id . '" type="hidden"
76
+/><input name="id_rubrique" value="' . $id.'" type="hidden"
77 77
 /><input name="page" value="rubrique" type="hidden"
78 78
 />',
79
-				1 => './?rubrique' . $id . '&calendrier=1',
79
+				1 => './?rubrique'.$id.'&calendrier=1',
80 80
 			],
81 81
 			2 =>
82 82
 			[
83
-				0 => '<input name="id_rubrique" value="' . $id . '" type="hidden"
83
+				0 => '<input name="id_rubrique" value="'.$id.'" type="hidden"
84 84
 /><input name="page" value="rubrique" type="hidden"
85 85
 />',
86
-				1 => './rubrique' . $id . '.html',
86
+				1 => './rubrique'.$id.'.html',
87 87
 			],
88 88
 			3 =>
89 89
 			[
90 90
 				0 => '<input name="calendrier" value="1" type="hidden"
91
-/><input name="id_rubrique" value="' . $id . '" type="hidden"
91
+/><input name="id_rubrique" value="' . $id.'" type="hidden"
92 92
 /><input name="page" value="rubrique" type="hidden"
93 93
 />',
94
-				1 => './rubrique' . $id . '.html?calendrier=1',
94
+				1 => './rubrique'.$id.'.html?calendrier=1',
95 95
 			],
96 96
 			4 =>
97 97
 			[
98 98
 				0 => '<input name="calendrier" value="1" type="hidden"
99
-/><input name="id_rubrique" value="' . $id . '" type="hidden"
99
+/><input name="id_rubrique" value="' . $id.'" type="hidden"
100 100
 /><input name="page" value="rubrique" type="hidden"
101 101
 />',
102
-				1 => './?rubrique' . $id . '&amp;calendrier=1',
102
+				1 => './?rubrique'.$id.'&amp;calendrier=1',
103 103
 			],
104 104
 			5 =>
105 105
 			[
106 106
 				0 => '<input name="calendrier" value="1" type="hidden"
107 107
 /><input name="toto" value="2" type="hidden"
108
-/><input name="id_rubrique" value="' . $id . '" type="hidden"
108
+/><input name="id_rubrique" value="' . $id.'" type="hidden"
109 109
 /><input name="page" value="rubrique" type="hidden"
110 110
 />',
111
-				1 => './rubrique' . $id . '.html?calendrier=1&amp;toto=2',
111
+				1 => './rubrique'.$id.'.html?calendrier=1&amp;toto=2',
112 112
 			],
113 113
 		];
114 114
 	}
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 		$id_rubrique = sql_getfetsel(
119 119
 			'id_rubrique',
120 120
 			'spip_rubriques',
121
-			['statut = ' . sql_quote('publie')],
121
+			['statut = '.sql_quote('publie')],
122 122
 			limit: '0, 1',
123 123
 		);
124 124
 		return $id_rubrique ? (int) $id_rubrique : null;
Please login to merge, or discard this patch.
ecrire/tests/Filtre/ExtraireBalisesTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	}
49 49
 
50 50
 	public function testFiltresExtraireBalisesMediaRss(): void {
51
-		$rss = file_get_contents(dirname(__DIR__) . '/Fixtures/data/dailymotion.rss');
51
+		$rss = file_get_contents(dirname(__DIR__).'/Fixtures/data/dailymotion.rss');
52 52
 		if (empty($rss)) {
53 53
 			$this->markTestSkipped();
54 54
 		}
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		return [
63 63
 			[['<a href="truc">chose</a>'], 'allo <a href="truc">chose</a>'],
64 64
 			[['<a href="truc" />'], 'allo <a href="truc" />'],
65
-			[["<a\nhref='truc' />"], 'allo' . "\n" . " <a\nhref='truc' />"],
65
+			[["<a\nhref='truc' />"], 'allo'."\n"." <a\nhref='truc' />"],
66 66
 			[[['<a href="1">'], ['<a href="2">']], ['allo <a href="1">', 'allo <a href="2">']],
67 67
 			[['<a href="truc">chose</a>'], 'bonjour <a href="truc">chose</a> machin'],
68 68
 			[
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 			[['<a>chose</a>'], '<a>chose</a>'],
75 75
 			[['<a href="truc">chose</a>'], 'allo <a href="truc">chose</a>', 'a'],
76 76
 			[['<a href="truc" />'], 'allo <a href="truc" />', 'a'],
77
-			[["<a\nhref='truc' />"], 'allo' . "\n" . " <a\nhref='truc' />", 'a'],
77
+			[["<a\nhref='truc' />"], 'allo'."\n"." <a\nhref='truc' />", 'a'],
78 78
 			[[['<a href="1">'], ['<a href="2">']], ['allo <a href="1">', 'allo <a href="2">'], 'a'],
79 79
 			[['<a href="truc">chose</a>'], 'bonjour <a href="truc">chose</a> machin', 'a'],
80 80
 			[
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 			[['<a>chose</a>'], '<a>chose</a>', 'a'],
88 88
 			[[], 'allo <a href="truc">chose</a>', 'b'],
89 89
 			[[], 'allo <a href="truc" />', 'b'],
90
-			[[], 'allo' . "\n" . " <a\nhref='truc' />", 'b'],
90
+			[[], 'allo'."\n"." <a\nhref='truc' />", 'b'],
91 91
 			[[[], []], ['allo <a href="1">', 'allo <a href="2">'], 'b'],
92 92
 			[[], 'bonjour <a href="truc">chose</a> machin', 'b'],
93 93
 			[[], 'bonjour <a href="truc">chose</a> machin <A href="truc">machin</a>', 'b'],
Please login to merge, or discard this patch.
ecrire/tests/Filtre/AttributHtmlTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 			],
36 36
 			2 => [
37 37
 				'expected' => 'allons &#224; la mer',
38
-				'texte' => 'allons ' . chr(195) . chr(160) . ' la mer', // le a` risque de matcher \s
38
+				'texte' => 'allons '.chr(195).chr(160).' la mer', // le a` risque de matcher \s
39 39
 			],
40 40
 		];
41 41
 	}
Please login to merge, or discard this patch.