Skip to content

Commit 7c46044

Browse files
committed
Enable ensure_single_space option of whitespace_after_comma_in_array
1 parent ef7d18b commit 7c46044

6 files changed

Lines changed: 17 additions & 14 deletions

File tree

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
'space' => 'none',
101101
'space_multiple_catch' => 'none',
102102
],
103+
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
103104
// >>>>>>>>>>>>>>>>>>>>>>>>>
104105
];
105106

.php-cs-fixer.no-header.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
'space' => 'none',
9393
'space_multiple_catch' => 'none',
9494
],
95+
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
9596
// >>>>>>>>>>>>>>>>>>>>>>>>>
9697
];
9798

.php-cs-fixer.user-guide.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
'space' => 'none',
9595
'space_multiple_catch' => 'none',
9696
],
97+
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
9798
// >>>>>>>>>>>>>>>>>>>>>>>>>
9899
];
99100

system/Helpers/text_helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function entities_to_ascii(string $str, bool $all = true): string
149149
if ($all) {
150150
return str_replace(
151151
['&', '<', '>', '"', ''', '-'],
152-
['&', '<', '>', '"', "'", '-'],
152+
['&', '<', '>', '"', "'", '-'],
153153
$str
154154
);
155155
}

tests/system/Database/BaseConnectionTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -190,43 +190,43 @@ public function identifiersProvider(): Generator
190190
yield from [
191191
// $prefixSingle, $protectIdentifiers, $fieldExists, $item, $expected
192192
'empty string' => [false, true, true, '', ''],
193-
'empty string prefix' => [true, true, true, '', '"test_"'], // Incorrect usage? or should be ''?
193+
'empty string prefix' => [true, true, true, '', '"test_"'], // Incorrect usage? or should be ''?
194194
195195
'single table' => [false, true, false, 'jobs', '"jobs"'],
196-
'single table prefix' => [true, true, false, 'jobs', '"test_jobs"'],
196+
'single table prefix' => [true, true, false, 'jobs', '"test_jobs"'],
197197

198198
'string' => [false, true, true, "'Accountant'", "'Accountant'"],
199-
'single prefix' => [true, true, true, "'Accountant'", "'Accountant'"],
199+
'single prefix' => [true, true, true, "'Accountant'", "'Accountant'"],
200200

201201
'numbers only' => [false, true, false, '12345', '12345'], // Should be quoted?
202-
'numbers only prefix' => [true, true, false, '12345', '"test_12345"'],
202+
'numbers only prefix' => [true, true, false, '12345', '"test_12345"'],
203203

204204
'table AS alias' => [false, true, false, 'role AS myRole', '"role" AS "myRole"'],
205-
'table AS alias prefix' => [true, true, false, 'role AS myRole', '"test_role" AS "myRole"'],
205+
'table AS alias prefix' => [true, true, false, 'role AS myRole', '"test_role" AS "myRole"'],
206206

207207
'quoted table' => [false, true, false, '"jobs"', '"jobs"'],
208-
'quoted table prefix' => [true, true, false, '"jobs"', '"test_jobs"'],
208+
'quoted table prefix' => [true, true, false, '"jobs"', '"test_jobs"'],
209209

210210
'quoted table alias' => [false, true, false, '"jobs" "j"', '"jobs" "j"'],
211-
'quoted table alias prefix' => [true, true, false, '"jobs" "j"', '"test_jobs" "j"'],
211+
'quoted table alias prefix' => [true, true, false, '"jobs" "j"', '"test_jobs" "j"'],
212212

213213
'table.*' => [false, true, true, 'jobs.*', '"test_jobs".*'], // Prefixed because it has segments
214-
'table.* prefix' => [true, true, true, 'jobs.*', '"test_jobs".*'],
214+
'table.* prefix' => [true, true, true, 'jobs.*', '"test_jobs".*'],
215215
'table.column' => [false, true, true, 'users.id', '"test_users"."id"'], // Prefixed because it has segments
216-
'table.column prefix' => [true, true, true, 'users.id', '"test_users"."id"'],
216+
'table.column prefix' => [true, true, true, 'users.id', '"test_users"."id"'],
217217
'table.column AS' => [
218218
false, true, true,
219219
'users.id AS user_id',
220220
'"test_users"."id" AS "user_id"', // Prefixed because it has segments
221221
],
222222
'table.column AS prefix' => [
223-
true, true, true,
223+
true, true, true,
224224
'users.id AS user_id',
225225
'"test_users"."id" AS "user_id"',
226226
],
227227

228228
'function table.column' => [false, true, true, 'LOWER(jobs.name)', 'LOWER(jobs.name)'],
229-
'function table.column prefix' => [true, true, true, 'LOWER(jobs.name)', 'LOWER(jobs.name)'],
229+
'function table.column prefix' => [true, true, true, 'LOWER(jobs.name)', 'LOWER(jobs.name)'],
230230

231231
'function only' => [false, true, true, 'RAND()', 'RAND()'],
232232
'function column' => [false, true, true, 'SUM(id)', 'SUM(id)'],

user_guide_src/source/outgoing/table/002.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
$data = [
66
['Name', 'Color', 'Size'],
7-
['Fred', 'Blue', 'Small'],
8-
['Mary', 'Red', 'Large'],
7+
['Fred', 'Blue', 'Small'],
8+
['Mary', 'Red', 'Large'],
99
['John', 'Green', 'Medium'],
1010
];
1111

0 commit comments

Comments
 (0)