1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Enhancement: Enable switch_case_space fixer

Closes GH-669.
This commit is contained in:
Andreas Möller
2022-08-22 16:59:10 +02:00
committed by GitHub
parent d1bf270a0c
commit cdb83249d3
3 changed files with 20 additions and 7 deletions

View File

@@ -28,6 +28,7 @@ $config
'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,

View File

@@ -122,9 +122,13 @@ $URI = rtrim($URI, '/');
// 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;
}
}

View File

@@ -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)