Skip to content

Enhancement: Enable switch_case_space fixer #669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
'ordered_class_elements' => true,
'single_space_after_construct' => true,
'strict_param' => true,
'switch_case_space' => true,
'trim_array_spaces' => true,
'visibility_required' => true,
'whitespace_after_comma_in_array' => true,
Expand Down
10 changes: 7 additions & 3 deletions error.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,13 @@
// Some nice URLs for getting something for download
if (preg_match("!^get/([^/]+)$!", $URI, $what)) {
switch ($what[1]) {
case "php" : $URI = "downloads"; break;
case "docs" : // intentional
case "documentation" : $URI = "download-docs"; break;
case "php":
$URI = "downloads";
break;
case "docs": // intentional
case "documentation":
$URI = "download-docs";
break;
}
}

Expand Down
16 changes: 12 additions & 4 deletions include/langchooser.inc
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,18 @@ function language_choose_code()

// Translation table for accept-language codes and phpdoc codes
switch ($langdata[0]) {
case "pt-br" : $langdata[0] = 'pt_br'; break;
case "zh-cn" : $langdata[0] = 'zh'; break;
case "zh-hk" : $langdata[0] = 'hk'; break;
case "zh-tw" : $langdata[0] = 'tw'; break;
case "pt-br":
$langdata[0] = 'pt_br';
break;
case "zh-cn":
$langdata[0] = 'zh';
break;
case "zh-hk":
$langdata[0] = 'hk';
break;
case "zh-tw":
$langdata[0] = 'tw';
break;
}

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