mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Master language constructs shall be used instead of aliases.
This commit is contained in:
parent
58dbb2b436
commit
6524cccbd2
2
spark
2
spark
@ -25,7 +25,7 @@ define('SPARKED', true);
|
||||
|
||||
// Refuse to run when called from php-cgi
|
||||
if (strpos(PHP_SAPI, 'cgi') === 0) {
|
||||
die("The cli tool is not supported when running php-cgi. It needs php-cli to function!\n\n");
|
||||
exit("The cli tool is not supported when running php-cgi. It needs php-cli to function!\n\n");
|
||||
}
|
||||
|
||||
// Path to the front controller
|
||||
|
@ -440,12 +440,11 @@ class IncomingRequest extends Request
|
||||
if ($config->forceGlobalSecureRequests && $this->uri->getScheme() === 'http') {
|
||||
$this->uri->setScheme('https');
|
||||
}
|
||||
} elseif (! is_cli()) {
|
||||
// @codeCoverageIgnoreStart
|
||||
exit('You have an empty or invalid base URL. The baseURL value must be set in Config\App.php, or through the .env file.');
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
// @codeCoverageIgnoreStart
|
||||
elseif (! is_cli()) {
|
||||
die('You have an empty or invalid base URL. The baseURL value must be set in Config\App.php, or through the .env file.');
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@ -120,6 +120,7 @@ final class CodeIgniter4 extends AbstractRuleset
|
||||
'native_function_casing' => true,
|
||||
'native_function_type_declaration_casing' => true,
|
||||
'no_alias_functions' => ['sets' => ['@all']],
|
||||
'no_alias_language_construct_call' => true,
|
||||
'no_short_bool_cast' => true,
|
||||
'no_trailing_comma_in_singleline_array' => true,
|
||||
'no_unset_cast' => true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user