From 717b364beb4adb49b52128c6d8cad8b4bd7796a7 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera <pol.dellaiera@protonmail.com> Date: Tue, 1 Jun 2021 22:55:50 +0200 Subject: [PATCH] refactor: Fix PHPStan. --- docs/pages/code/simple.php | 4 +--- phpstan-docs-baseline.neon | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/docs/pages/code/simple.php b/docs/pages/code/simple.php index 418b362dc..a76293615 100644 --- a/docs/pages/code/simple.php +++ b/docs/pages/code/simple.php @@ -63,9 +63,7 @@ static function ($value, $key): string { // Keys are preserved during the map() operation. Collection::fromIterable(['A' => 'A', 'B' => 'B', 'C' => 'C', 'D' => 'D', 'E' => 'E']) ->map( - static function (string $value, string $key): string { - return mb_strtolower($value); - } + static fn (string $value): string => strtolower($value) ) ->all(); // ['A' => 'a', B => 'b', 'C' => 'c', 'D' = >'d', 'E' => 'e'] diff --git a/phpstan-docs-baseline.neon b/phpstan-docs-baseline.neon index 50554478a..c32abf778 100644 --- a/phpstan-docs-baseline.neon +++ b/phpstan-docs-baseline.neon @@ -9,8 +9,3 @@ parameters: message: "#^Unable to resolve the template type NewTKey in call to method static method loophp\\\\collection\\\\Collection\\<mixed,mixed\\>\\:\\:fromIterable\\(\\)$#" count: 1 path: docs/pages/code/parse-git-log.php - - - - message: "#^Parameter \\#1 \\$str of function mb_strtolower expects string, int given\\.$#" - count: 1 - path: docs/pages/code/simple.php