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:
@@ -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,
|
||||
|
||||
10
error.php
10
error.php
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user