From 2a928ab11921bf70429a64660c53d9826cd722ec Mon Sep 17 00:00:00 2001 From: jawira Date: Sun, 14 Aug 2022 13:18:15 +0200 Subject: [PATCH 1/4] refactor: Use arrow function in Gluer::changeWordsCase --- src/Glue/Gluer.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Glue/Gluer.php b/src/Glue/Gluer.php index 7833ef9..7bcc1bd 100644 --- a/src/Glue/Gluer.php +++ b/src/Glue/Gluer.php @@ -101,9 +101,7 @@ protected function changeWordsCase(array $words, int $caseMode): array return $words; } - $closure = static function (string $word) use ($caseMode): string { - return mb_convert_case($word, $caseMode, self::ENCODING); - }; + $closure = static fn(string $word): string => mb_convert_case($word, $caseMode, self::ENCODING); return array_map($closure, $words); } From fb0a7af493ff7d0215cf75c19f8eaabd96dae18e Mon Sep 17 00:00:00 2001 From: jawira Date: Sun, 14 Aug 2022 13:30:00 +0200 Subject: [PATCH 2/4] ci: add php 8.2 --- .github/workflows/qa.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index e90af93..fcde491 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -10,7 +10,7 @@ jobs: tests: strategy: matrix: - php: [ '7.4','8.0','8.1' ] + php: [ '7.4','8.0','8.1','8.2' ] runs-on: ubuntu-22.04 steps: From 5704331b278121b7a2de630263a779492f07e30f Mon Sep 17 00:00:00 2001 From: jawira Date: Sun, 14 Aug 2022 13:34:27 +0200 Subject: [PATCH 3/4] ci: remove php 8.2 --- .github/workflows/qa.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml index fcde491..e90af93 100644 --- a/.github/workflows/qa.yaml +++ b/.github/workflows/qa.yaml @@ -10,7 +10,7 @@ jobs: tests: strategy: matrix: - php: [ '7.4','8.0','8.1','8.2' ] + php: [ '7.4','8.0','8.1' ] runs-on: ubuntu-22.04 steps: From 016ddd713a527dfde195a487d749e4be69dd6a1f Mon Sep 17 00:00:00 2001 From: jawira Date: Sun, 14 Aug 2022 13:37:53 +0200 Subject: [PATCH 4/4] refactor: use more descriptive name for closure --- src/Glue/Gluer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Glue/Gluer.php b/src/Glue/Gluer.php index 7bcc1bd..99a1763 100644 --- a/src/Glue/Gluer.php +++ b/src/Glue/Gluer.php @@ -101,9 +101,9 @@ protected function changeWordsCase(array $words, int $caseMode): array return $words; } - $closure = static fn(string $word): string => mb_convert_case($word, $caseMode, self::ENCODING); + $convertCase = static fn(string $word): string => mb_convert_case($word, $caseMode, self::ENCODING); - return array_map($closure, $words); + return array_map($convertCase, $words); } /**