diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 4e123d37e..67bec93d1 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -7,7 +7,7 @@ ->ignoreDotFiles(true) ->ignoreVCS(true); -return \MLL\PhpCsFixerConfig\risky($finder, [ +return MLL\PhpCsFixerConfig\risky($finder, [ 'no_superfluous_phpdoc_tags' => [ 'allow_mixed' => true, ], @@ -24,4 +24,4 @@ 'identical' => false, 'less_and_greater' => false, ], -]); +])->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect()); diff --git a/composer.json b/composer.json index 0561bd68b..4fa0d0da5 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "amphp/http-server": "^2.1", "dms/phpunit-arraysubset-asserts": "dev-master", "ergebnis/composer-normalize": "^2.28", - "friendsofphp/php-cs-fixer": "3.65.0", + "friendsofphp/php-cs-fixer": "3.71.0", "mll-lab/php-cs-fixer-config": "^5.9.2", "nyholm/psr7": "^1.5", "phpbench/phpbench": "^1.2", diff --git a/src/Utils/Utils.php b/src/Utils/Utils.php index 631185fdf..5e38afd02 100644 --- a/src/Utils/Utils.php +++ b/src/Utils/Utils.php @@ -217,12 +217,10 @@ public static function orList(array $items): string return \array_reduce( \range(1, $selectedLength - 1), - static function ($list, $index) use ($selected, $selectedLength): string { - return $list - . ($selectedLength > 2 ? ', ' : ' ') - . ($index === $selectedLength - 1 ? 'or ' : '') - . $selected[$index]; - }, + static fn ($list, $index): string => $list + . ($selectedLength > 2 ? ', ' : ' ') + . ($index === $selectedLength - 1 ? 'or ' : '') + . $selected[$index], $firstSelected ); }