@@ -9,8 +9,8 @@ |
||
| 9 | 9 | use |
| 10 | 10 | cs\Language; |
| 11 | 11 | /** |
| 12 | - * Class for simplified work with translations, when using common prefix |
|
| 13 | - */ |
|
| 12 | + * Class for simplified work with translations, when using common prefix |
|
| 13 | + */ |
|
| 14 | 14 | class Prefix { |
| 15 | 15 | /** |
| 16 | 16 | * @var string |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | /** |
| 372 | 372 | * Narrow the dependencies to current module only |
| 373 | 373 | */ |
| 374 | - $dependencies = array_merge( |
|
| 374 | + $dependencies = array_merge( |
|
| 375 | 375 | isset($dependencies[$current_module]) ? $dependencies[$current_module] : [], |
| 376 | 376 | $dependencies['System'] |
| 377 | 377 | ); |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | * @return string[][] |
| 426 | 426 | */ |
| 427 | 427 | protected function add_versions_hash ($includes) { |
| 428 | - $content = array_reduce( |
|
| 428 | + $content = array_reduce( |
|
| 429 | 429 | get_files_list(DIR.'/components', '/^meta\.json$/', 'f', true, true), |
| 430 | 430 | function ($content, $file) { |
| 431 | 431 | return $content.file_get_contents($file); |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | ). |
| 456 | 456 | h::style($this->core_css['plain'].$this->css['plain'] ?: false); |
| 457 | 457 | /** @noinspection NestedTernaryOperatorInspection */ |
| 458 | - $scripts = |
|
| 458 | + $scripts = |
|
| 459 | 459 | array_reduce( |
| 460 | 460 | array_merge($this->core_js['path'], $this->js['path']), |
| 461 | 461 | function ($content, $src) { |
@@ -9,9 +9,9 @@ |
||
| 9 | 9 | * Time of start of execution, is used as current time |
| 10 | 10 | */ |
| 11 | 11 | define('MICROTIME', microtime(true)); //In seconds (float) |
| 12 | -define('TIME', floor(MICROTIME)); //In seconds (integer) |
|
| 12 | +define('TIME', floor(MICROTIME)); //In seconds (integer) |
|
| 13 | 13 | chdir(__DIR__.'/..'); |
| 14 | -define('DIR', getcwd()); //Root directory |
|
| 14 | +define('DIR', getcwd()); //Root directory |
|
| 15 | 15 | /** |
| 16 | 16 | * Defining of basic constants with paths to system directories |
| 17 | 17 | */ |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | Header set Content-Type application/octet-stream |
| 72 | 72 | </ifModule> |
| 73 | 73 | |
| 74 | -HTACCESS |
|
| 74 | +htaccess |
|
| 75 | 75 | ); |
| 76 | 76 | } |
| 77 | 77 | if (!is_dir(CACHE)) { |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | AddEncoding gzip .css |
| 100 | 100 | AddEncoding gzip .html |
| 101 | 101 | |
| 102 | -HTACCESS |
|
| 102 | +htaccess |
|
| 103 | 103 | ); |
| 104 | 104 | } |
| 105 | 105 | if (!is_dir(LOGS)) { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | <<<HTACCESS |
| 116 | 116 | Allow From All |
| 117 | 117 | |
| 118 | -HTACCESS |
|
| 118 | +htaccess |
|
| 119 | 119 | ); |
| 120 | 120 | } |
| 121 | 121 | /** |
@@ -319,7 +319,7 @@ |
||
| 319 | 319 | 1. <g>--TEST--</g> is not required and not even used (files names are used instead) |
| 320 | 320 | 2. Only sub-set of sections supported and only sub-set of <g>--EXPECTF--</g> tags |
| 321 | 321 | 3. <g>--EXPECT*--</g> sections are interpreted as code and its output is used as expected result |
| 322 | -HTML |
|
| 322 | +html |
|
| 323 | 323 | ); |
| 324 | 324 | exit; |
| 325 | 325 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $expect = rtrim(execute_code($working_dir, $parsed_test['EXPECT'], $php_arguments, $script_arguments)); |
| 112 | 112 | if ($expect === $output) { |
| 113 | 113 | line("<g>$base_text SUCCESS</g>", true); |
| 114 | - isset($parsed_test['CLEAN']) && execute_code($working_dir, $parsed_test['CLEAN'], $php_arguments, $script_arguments);; |
|
| 114 | + isset($parsed_test['CLEAN']) && execute_code($working_dir, $parsed_test['CLEAN'], $php_arguments, $script_arguments); ; |
|
| 115 | 115 | return 'success'; |
| 116 | 116 | } |
| 117 | 117 | $expect = $parsed_test['EXPECT']; |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | ); |
| 147 | 147 | if (preg_match("/^$regex\$/s", $output)) { |
| 148 | 148 | line("<g>$base_text SUCCESS</g>", true); |
| 149 | - isset($parsed_test['CLEAN']) && execute_code($working_dir, $parsed_test['CLEAN'], $php_arguments, $script_arguments);; |
|
| 149 | + isset($parsed_test['CLEAN']) && execute_code($working_dir, $parsed_test['CLEAN'], $php_arguments, $script_arguments); ; |
|
| 150 | 150 | return 'success'; |
| 151 | 151 | } |
| 152 | 152 | $expect = $parsed_test['EXPECTF']; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $regex = preg_quote($expect, '/'); |
| 156 | 156 | if (preg_match("/^$regex\$/s", $output)) { |
| 157 | 157 | line("<g>$base_text SUCCESS</g>", true); |
| 158 | - isset($parsed_test['CLEAN']) && execute_code($working_dir, $parsed_test['CLEAN'], $php_arguments, $script_arguments);; |
|
| 158 | + isset($parsed_test['CLEAN']) && execute_code($working_dir, $parsed_test['CLEAN'], $php_arguments, $script_arguments); ; |
|
| 159 | 159 | return 'success'; |
| 160 | 160 | } |
| 161 | 161 | } |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | ); |
| 274 | 274 | $base_target_file_name = basename($base_target_file_path); |
| 275 | 275 | // Replace first script with combined file |
| 276 | - $data = str_replace( |
|
| 276 | + $data = str_replace( |
|
| 277 | 277 | $scripts_to_replace[0], |
| 278 | 278 | "<script src=\"$base_target_file_name.js?$content_md5\"></script>", |
| 279 | 279 | $data |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | ); |
| 378 | 378 | $base_target_file_name = basename($base_target_file_path); |
| 379 | 379 | // Replace first link or style with combined file |
| 380 | - $data = str_replace( |
|
| 380 | + $data = str_replace( |
|
| 381 | 381 | $links_and_styles_to_replace[0], |
| 382 | 382 | "<link rel=\"import\" type=\"css\" href=\"$base_target_file_name.css?$content_md5\">", |
| 383 | 383 | $data |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | 'alias' => "cs\\custom\\$_custom_class", |
| 102 | 102 | 'path' => $custom_class |
| 103 | 103 | ]; |
| 104 | - $next_alias = "cs\\custom\\$custom_class"; |
|
| 104 | + $next_alias = "cs\\custom\\$custom_class"; |
|
| 105 | 105 | } |
| 106 | 106 | $modified_classes[$class] = [ |
| 107 | 107 | 'aliases' => $aliases, |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | if ($User->guest()) { |
| 23 | 23 | throw new ExitException(403); |
| 24 | 24 | } |
| 25 | - $fields = [ |
|
| 25 | + $fields = [ |
|
| 26 | 26 | 'id', |
| 27 | 27 | 'login', |
| 28 | 28 | 'username', |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | throw new ExitException($L->comment_deleting_server_error, 500); |
| 60 | 60 | } |
| 61 | 61 | if ($Comments->del($Request->route[0])) { |
| 62 | - $Page->json('');//TODO: get rid of this |
|
| 62 | + $Page->json(''); //TODO: get rid of this |
|
| 63 | 63 | } else { |
| 64 | 64 | throw new ExitException($L->comment_deleting_server_error, 500); |
| 65 | 65 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | protected $shortname; |
| 27 | 27 | |
| 28 | 28 | protected function construct () { |
| 29 | - $this->shortname = Config::instance()->module('Disqus')->shortname; |
|
| 29 | + $this->shortname = Config::instance()->module('Disqus')->shortname; |
|
| 30 | 30 | } |
| 31 | 31 | /** |
| 32 | 32 | * Count of comments for specified item |
@@ -65,11 +65,11 @@ discard block |
||
| 65 | 65 | return '<div id="disqus_thread"></div>'; |
| 66 | 66 | } |
| 67 | 67 | protected function count_js () { |
| 68 | - static $added = false; |
|
| 68 | + static $added = false; |
|
| 69 | 69 | if ($added) { |
| 70 | 70 | return; |
| 71 | 71 | } |
| 72 | - $added = true; |
|
| 72 | + $added = true; |
|
| 73 | 73 | Page::instance()->js( |
| 74 | 74 | "var disqus_shortname = '$this->shortname'; |
| 75 | 75 | if (!window.disqus_count_items) { window.disqus_count_items = []; }", |
@@ -77,11 +77,11 @@ discard block |
||
| 77 | 77 | ); |
| 78 | 78 | } |
| 79 | 79 | protected function block_js ($item, $module) { |
| 80 | - static $added = false; |
|
| 80 | + static $added = false; |
|
| 81 | 81 | if ($added) { |
| 82 | 82 | return; |
| 83 | 83 | } |
| 84 | - $added = true; |
|
| 84 | + $added = true; |
|
| 85 | 85 | Page::instance()->js( |
| 86 | 86 | "var disqus_shortname = '$this->shortname', disqus_identifier = '".str_replace("'", "'", "$module/$item")."';", |
| 87 | 87 | 'code' |