@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | // URL Association for SSL and Protocol Compatibility |
37 | 37 | $http = 'http://'; |
38 | 38 | if (!empty($_SERVER['HTTPS'])) { |
39 | - $http = ($_SERVER['HTTPS']==='on') ? 'https://' : 'http://'; |
|
39 | + $http = ($_SERVER['HTTPS'] === 'on') ? 'https://' : 'http://'; |
|
40 | 40 | } |
41 | 41 | define('XOOPS_PROT', $http); |
42 | 42 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | } |
57 | 57 | $xoopsScriptPath = $xoopsScriptPath[0]["file"]; |
58 | 58 | } else { |
59 | - $xoopsScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] : $_SERVER["SCRIPT_FILENAME"]; |
|
59 | + $xoopsScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] : $_SERVER["SCRIPT_FILENAME"]; |
|
60 | 60 | } |
61 | 61 | if (DIRECTORY_SEPARATOR !== "/") { |
62 | 62 | // IIS6 may double the \ chars |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | // Secure file |
71 | - require XOOPS_VAR_PATH . '/data/secure.php'; |
|
71 | + require XOOPS_VAR_PATH.'/data/secure.php'; |
|
72 | 72 | |
73 | 73 | if (!class_exists('XoopsBaseConfig', false)) { |
74 | - include __DIR__ . '/class/XoopsBaseConfig.php'; |
|
74 | + include __DIR__.'/class/XoopsBaseConfig.php'; |
|
75 | 75 | XoopsBaseConfig::bootstrapTransition(); |
76 | 76 | } |
77 | 77 |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | if (function_exists("debug_backtrace")) { |
50 | 50 | $xoopsScriptPath = debug_backtrace(); |
51 | 51 | if (!count($xoopsScriptPath)) { |
52 | - die("XOOPS path check: this file cannot be requested directly"); |
|
52 | + die("XOOPS path check: this file cannot be requested directly"); |
|
53 | 53 | } |
54 | 54 | $xoopsScriptPath = $xoopsScriptPath[0]["file"]; |
55 | 55 | } else { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $xoopsScriptPath = str_replace(strpos($xoopsScriptPath, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $xoopsScriptPath); |
61 | 61 | } |
62 | 62 | if (strcasecmp(substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace(DIRECTORY_SEPARATOR, "/", XOOPS_ROOT_PATH))) { |
63 | - exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run."); |
|
63 | + exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run."); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | $configs = array( |
3 | - 'autoloader' => dirname(__DIR__) . '/xoops_lib/vendor/autoload.php', |
|
4 | - 'configfile' => getcwd() . '/xoopsCIconfigs.php', |
|
5 | - 'mainfile' => dirname(__DIR__) . '/htdocs/mainfile.php', |
|
3 | + 'autoloader' => dirname(__DIR__).'/xoops_lib/vendor/autoload.php', |
|
4 | + 'configfile' => getcwd().'/xoopsCIconfigs.php', |
|
5 | + 'mainfile' => dirname(__DIR__).'/htdocs/mainfile.php', |
|
6 | 6 | ); |
7 | 7 | return new \XoopsConsole\Library\SimpleContainer($configs); |
@@ -8,15 +8,15 @@ |
||
8 | 8 | die ('CLI use only'); |
9 | 9 | } |
10 | 10 | |
11 | -spl_autoload_register(function ($class) { |
|
11 | +spl_autoload_register(function($class) { |
|
12 | 12 | $prefix = 'XoopsConsole\\'; |
13 | - $base_dir = __DIR__ . '/'; |
|
13 | + $base_dir = __DIR__.'/'; |
|
14 | 14 | $len = strlen($prefix); |
15 | 15 | if (strncmp($prefix, $class, $len) !== 0) { |
16 | 16 | return; |
17 | 17 | } |
18 | 18 | $relative_class = substr($class, $len); |
19 | - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
19 | + $file = $base_dir.str_replace('\\', '/', $relative_class).'.php'; |
|
20 | 20 | if (file_exists($file)) { |
21 | 21 | require $file; |
22 | 22 | } |
@@ -11,15 +11,15 @@ |
||
11 | 11 | class TestCommand extends Command { |
12 | 12 | protected function configure() { |
13 | 13 | $this->setName("test") |
14 | - ->setDescription("Sample description for our command named test") |
|
15 | - ->setDefinition(array( |
|
14 | + ->setDescription("Sample description for our command named test") |
|
15 | + ->setDefinition(array( |
|
16 | 16 | new InputOption('flag', 'f', InputOption::VALUE_NONE, 'Raise a flag'), |
17 | 17 | new InputArgument('name', InputArgument::OPTIONAL, 'A name', 'uhhh, ... Clem'), |
18 | 18 | )) |
19 | - ->setHelp(<<<EOT |
|
19 | + ->setHelp(<<<EOT |
|
20 | 20 | The <info>test</info> command just says hello. |
21 | 21 | EOT |
22 | - ); |
|
22 | + ); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | protected function execute(InputInterface $input, OutputInterface $output) { |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $output->writeln(strip_tags($message)); |
48 | 48 | } |
49 | 49 | } |
50 | - if ($result===false) { |
|
50 | + if ($result === false) { |
|
51 | 51 | $output->writeln(sprintf('<error>Uninstall of %s failed!</error>', $module)); |
52 | 52 | } else { |
53 | 53 | $output->writeln(sprintf('<info>Uninstall of %s completed.</info>', $module)); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | ))->setHelp(<<<EOT |
25 | 25 | The <info>install-module</info> command installs a module. |
26 | 26 | EOT |
27 | - ); |
|
27 | + ); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $output->writeln(strip_tags($message)); |
63 | 63 | } |
64 | 64 | } |
65 | - if ($result===false) { |
|
65 | + if ($result === false) { |
|
66 | 66 | $output->writeln(sprintf('<error>Install of %s failed!</error>', $module)); |
67 | 67 | } else { |
68 | 68 | $output->writeln(sprintf('<info>Install of %s completed.</info>', $module)); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | ))->setHelp(<<<EOT |
27 | 27 | The <info>set-config</info> command sets a configuration item to the specified value. |
28 | 28 | EOT |
29 | - ); |
|
29 | + ); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -23,7 +23,7 @@ |
||
23 | 23 | The <info>utf8mb4-module</info> command updates the tables that are owned by an installed module |
24 | 24 | to use MySQL's <info>utf8mb4</info> character set, and <info>utf8mb4_unicode_ci</info> collation. |
25 | 25 | EOT |
26 | - ); |
|
26 | + ); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | protected function execute(InputInterface $input, OutputInterface $output) |
@@ -45,7 +45,7 @@ |
||
45 | 45 | } |
46 | 46 | $module->loadInfo($dirname, false); |
47 | 47 | $modVersion = $module->modinfo; |
48 | - $tableList = isset($modVersion['tables']) ? $modVersion['tables'] : []; |
|
48 | + $tableList = isset($modVersion['tables']) ? $modVersion['tables'] : []; |
|
49 | 49 | //\Kint::dump($modVersion, $tableList); |
50 | 50 | $sql = []; |
51 | 51 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | This can be especially useful if the module configuration has changed, and |
24 | 24 | it is interfering with normal online operation. |
25 | 25 | EOT |
26 | - ); |
|
26 | + ); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | protected function execute(InputInterface $input, OutputInterface $output) |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $output->writeln(strip_tags($message)); |
51 | 51 | } |
52 | 52 | } |
53 | - if ($result===false) { |
|
53 | + if ($result === false) { |
|
54 | 54 | $output->writeln(sprintf('<error>Update of %s failed!</error>', $module)); |
55 | 55 | } else { |
56 | 56 | $output->writeln(sprintf('<info>Update of %s completed.</info>', $module)); |