Skip to content

Commit cdb8324

Browse files
authored
Enhancement: Enable switch_case_space fixer
Closes GH-669.
1 parent d1bf270 commit cdb8324

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

.php-cs-fixer.php

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
'ordered_class_elements' => true,
2929
'single_space_after_construct' => true,
3030
'strict_param' => true,
31+
'switch_case_space' => true,
3132
'trim_array_spaces' => true,
3233
'visibility_required' => true,
3334
'whitespace_after_comma_in_array' => true,

error.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,13 @@
122122
// Some nice URLs for getting something for download
123123
if (preg_match("!^get/([^/]+)$!", $URI, $what)) {
124124
switch ($what[1]) {
125-
case "php" : $URI = "downloads"; break;
126-
case "docs" : // intentional
127-
case "documentation" : $URI = "download-docs"; break;
125+
case "php":
126+
$URI = "downloads";
127+
break;
128+
case "docs": // intentional
129+
case "documentation":
130+
$URI = "download-docs";
131+
break;
128132
}
129133
}
130134

include/langchooser.inc

+12-4
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,18 @@ function language_choose_code()
122122

123123
// Translation table for accept-language codes and phpdoc codes
124124
switch ($langdata[0]) {
125-
case "pt-br" : $langdata[0] = 'pt_br'; break;
126-
case "zh-cn" : $langdata[0] = 'zh'; break;
127-
case "zh-hk" : $langdata[0] = 'hk'; break;
128-
case "zh-tw" : $langdata[0] = 'tw'; break;
125+
case "pt-br":
126+
$langdata[0] = 'pt_br';
127+
break;
128+
case "zh-cn":
129+
$langdata[0] = 'zh';
130+
break;
131+
case "zh-hk":
132+
$langdata[0] = 'hk';
133+
break;
134+
case "zh-tw":
135+
$langdata[0] = 'tw';
136+
break;
129137
}
130138

131139
// We do not support flavors of languages (except the ones above)

0 commit comments

Comments
 (0)