@@ -18,8 +18,7 @@ |
||
| 18 | 18 | * |
| 19 | 19 | * @throws \cs\ExitException |
| 20 | 20 | */ |
| 21 | - public static function init_from_psr7 ($Psr7_request) { |
|
| 22 | - ++System_request::$id; |
|
| 21 | + public static function init_from_psr7 ($Psr7_request) {++System_request::$id; |
|
| 23 | 22 | $System_request = System_request::instance(); |
| 24 | 23 | self::from_psr7_server($System_request, $Psr7_request); |
| 25 | 24 | self::from_psr7_query($System_request, $Psr7_request); |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | return true; |
| 109 | 109 | } |
| 110 | 110 | ); |
| 111 | - $methods = _strtoupper(_substr($methods, strlen($method_name) + 1)); |
|
| 111 | + $methods = _strtoupper(_substr($methods, strlen($method_name) + 1)); |
|
| 112 | 112 | natcasesort($methods); |
| 113 | 113 | return array_values($methods); |
| 114 | 114 | } |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | php build.php -M core -m Plupload,Static_pages |
| 76 | 76 | php build.php -M core -p TinyMCE -t DarkEnergy -s custom |
| 77 | 77 | php build.php -M module -m Plupload,Static_pages |
| 78 | -HELP; |
|
| 78 | +help; |
|
| 79 | 79 | } elseif ($mode == 'core') { |
| 80 | 80 | echo $Builder->core($modules, $plugins, $themes, $suffix)."\n"; |
| 81 | 81 | } else { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | 'storage' => 'json', |
| 77 | 77 | 'components' => 'json' |
| 78 | 78 | ]; |
| 79 | - protected $table = '[prefix]config'; |
|
| 79 | + protected $table = '[prefix]config'; |
|
| 80 | 80 | protected function cdb () { |
| 81 | 81 | return 0; |
| 82 | 82 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | return $multilingual_options; |
| 165 | 165 | } |
| 166 | 166 | ); |
| 167 | - $this->core = $multilingual_options + $this->core; |
|
| 167 | + $this->core = $multilingual_options + $this->core; |
|
| 168 | 168 | } |
| 169 | 169 | /** |
| 170 | 170 | * Applying settings without saving changes into db |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | date($L->{$time - $transaction['created'] < 24 * 3600 ? '_time' : '_datetime_long'}, $transaction['created']) |
| 83 | 83 | ) |
| 84 | 84 | : '-'; |
| 85 | - $paid = $transaction['paid'] |
|
| 85 | + $paid = $transaction['paid'] |
|
| 86 | 86 | ? $L->to_locale( |
| 87 | 87 | date($L->{$time - $transaction['paid'] < 24 * 3600 ? '_time' : '_datetime_long'}, $transaction['paid']) |
| 88 | 88 | ) |
@@ -94,8 +94,7 @@ discard block |
||
| 94 | 94 | : '-'; |
| 95 | 95 | $username = User::instance()->username($transaction['user']); |
| 96 | 96 | $class = |
| 97 | - $transaction['confirmed'] ? 'cs-block-success.cs-text-success' : |
|
| 98 | - ($transaction['paid'] ? 'cs-block-warning.cs-text-warning' : 'cs-block-error.cs-text-error'); |
|
| 97 | + $transaction['confirmed'] ? 'cs-block-success.cs-text-success' : ($transaction['paid'] ? 'cs-block-warning.cs-text-warning' : 'cs-block-error.cs-text-error'); |
|
| 99 | 98 | $tag = "td.$class"; |
| 100 | 99 | return [ |
| 101 | 100 | [ |
@@ -12,6 +12,6 @@ |
||
| 12 | 12 | Phar::mapPhar('php-code-coverage.phar'); |
| 13 | 13 | require_once 'phar://php-code-coverage.phar/autoload.php'; |
| 14 | 14 | __HALT_COMPILER(); |
| 15 | -STUB |
|
| 15 | +stub |
|
| 16 | 16 | ); |
| 17 | 17 | $phar->stopBuffering(); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | if (!file_exists($path_in_filesystem) || is_writable($path_in_filesystem)) { |
| 72 | 72 | return file_put_contents($path_in_filesystem, $data, LOCK_EX | FILE_BINARY); |
| 73 | 73 | } |
| 74 | - trigger_error("File $path_in_filesystem not available for writing", E_USER_WARNING); |
|
| 74 | + trigger_error("file $path_in_filesystem not available for writing", E_USER_WARNING); |
|
| 75 | 75 | return false; |
| 76 | 76 | } |
| 77 | 77 | /** |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | 0, |
| 93 | 93 | strpos($table_name, '"') |
| 94 | 94 | ); |
| 95 | - $update = preg_replace_callback( |
|
| 95 | + $update = preg_replace_callback( |
|
| 96 | 96 | '/"([^"]+)"/', |
| 97 | 97 | function ($matches) { |
| 98 | 98 | return "\"$matches[1]\" = EXCLUDED.\"$matches[1]\""; |
@@ -75,10 +75,10 @@ |
||
| 75 | 75 | * Try to load classes from different places. If not found in one place - try in another. |
| 76 | 76 | */ |
| 77 | 77 | if ( |
| 78 | - file_exists($file = CORE."/classes/$namespace/$class_name.php") || //Core classes |
|
| 78 | + file_exists($file = CORE."/classes/$namespace/$class_name.php") || //Core classes |
|
| 79 | 79 | file_exists($file = CORE."/thirdparty/$namespace/$class_name.php") || //Third party classes |
| 80 | - file_exists($file = CORE."/traits/$namespace/$class_name.php") || //Core traits |
|
| 81 | - file_exists($file = CORE."/drivers/$namespace/$class_name.php") || //Core drivers |
|
| 80 | + file_exists($file = CORE."/traits/$namespace/$class_name.php") || //Core traits |
|
| 81 | + file_exists($file = CORE."/drivers/$namespace/$class_name.php") || //Core drivers |
|
| 82 | 82 | file_exists($file = MODULES."/../$namespace/$class_name.php") //Classes in modules |
| 83 | 83 | ) { |
| 84 | 84 | $cache[$class] = realpath($file); |