Master language constructs shall be used instead of aliases.

This commit is contained in:
John Paul E. Balandan, CPA 2021-06-18 01:03:41 +08:00
parent 58dbb2b436
commit 6524cccbd2
No known key found for this signature in database
GPG Key ID: FB7B51499BC27610
3 changed files with 6 additions and 6 deletions

2
spark
View File

@ -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

View File

@ -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;
}

View File

@ -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,