Skip to content

Commit

Permalink
refactor: Fix PHPStan.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jun 1, 2021
1 parent cd8ef32 commit 717b364
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 1 addition & 3 deletions docs/pages/code/simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down
5 changes: 0 additions & 5 deletions phpstan-docs-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 717b364

Please sign in to comment.