Merge pull request #8754 from paulbalandan/modernize-strpos

style: enable modernize_strpos
This commit is contained in:
kenjis 2024-04-19 07:53:29 +09:00 committed by GitHub
commit 7914f81ec5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 14 additions and 4 deletions

View File

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

View File

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

View File

@ -35,6 +35,8 @@ $finder = Finder::create()
$overrides = [
'void_return' => true,
// for updating to coding-standard
'modernize_strpos' => true,
];
$options = [

View File

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

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

View File

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