From fc4375d257b76cf9de67cccc382c9e641e78e73c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 15:08:17 +0000 Subject: [PATCH 1/2] chore(deps): update dependency friendsofphp/php-cs-fixer to v3.66.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 206ebebb5..6601a6c78 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.66.0", "mll-lab/php-cs-fixer-config": "^5.9.2", "nyholm/psr7": "^1.5", "phpbench/phpbench": "^1.2", From f7a029c00d23db4e15bf4ca1a34bef461727609c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" Date: Sun, 29 Dec 2024 15:09:15 +0000 Subject: [PATCH 2/2] Apply php-cs-fixer changes --- src/Utils/Utils.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Utils/Utils.php b/src/Utils/Utils.php index 631185fdf..e489fbbb1 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 + static fn ($list, $index): string => $list . ($selectedLength > 2 ? ', ' : ' ') . ($index === $selectedLength - 1 ? 'or ' : '') - . $selected[$index]; - }, + . $selected[$index], $firstSelected ); }