mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
style: enable modernize_strpos
This commit is contained in:
parent
6a65664e10
commit
acdbc5dd0f
@ -40,7 +40,10 @@ $finder = Finder::create()
|
||||
__DIR__ . '/spark',
|
||||
]);
|
||||
|
||||
$overrides = [];
|
||||
$overrides = [
|
||||
// for updating to coding-standard
|
||||
'modernize_strpos' => true,
|
||||
];
|
||||
|
||||
$options = [
|
||||
'cacheFile' => 'build/.php-cs-fixer.cache',
|
||||
|
@ -29,7 +29,10 @@ $finder = Finder::create()
|
||||
__DIR__ . '/admin/starter/builds',
|
||||
]);
|
||||
|
||||
$overrides = [];
|
||||
$overrides = [
|
||||
// for updating to coding-standard
|
||||
'modernize_strpos' => true,
|
||||
];
|
||||
|
||||
$options = [
|
||||
'cacheFile' => 'build/.php-cs-fixer.no-header.cache',
|
||||
|
@ -35,6 +35,8 @@ $finder = Finder::create()
|
||||
|
||||
$overrides = [
|
||||
'void_return' => true,
|
||||
// for updating to coding-standard
|
||||
'modernize_strpos' => true,
|
||||
];
|
||||
|
||||
$options = [
|
||||
|
@ -39,6 +39,8 @@ $overrides = [
|
||||
'import_symbols' => false,
|
||||
'leading_backslash_in_global_namespace' => true,
|
||||
],
|
||||
// for updating to coding-standard
|
||||
'modernize_strpos' => true,
|
||||
];
|
||||
|
||||
$options = [
|
||||
|
2
spark
2
spark
@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
// Refuse to run when called from php-cgi
|
||||
if (strpos(PHP_SAPI, 'cgi') === 0) {
|
||||
if (str_starts_with(PHP_SAPI, 'cgi')) {
|
||||
exit("The cli tool is not supported when running php-cgi. It needs php-cli to function!\n\n");
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (strpos($response->header('content-type'), 'application/json') !== false) {
|
||||
if (str_contains($response->header('content-type'), 'application/json')) {
|
||||
$body = json_decode($body);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user