Skip to content

Commit 4b6752d

Browse files
committed
Fix
1 parent cbacc8a commit 4b6752d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Type/Php/ArrayFindFunctionReturnTypeExtension.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use PHPStan\Analyser\Scope;
88
use PHPStan\Reflection\FunctionReflection;
99
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
10-
use PHPStan\Type\NullType;
1110
use PHPStan\Type\Type;
1211
use PHPStan\Type\TypeCombinator;
1312
use function array_map;
@@ -33,7 +32,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
3332
}
3433

3534
$resultTypes = $scope->getType(new FuncCall(new Name('\array_filter'), $functionCall->getArgs()));
36-
$resultType = TypeCombinator::union(...array_map(fn ($type) => $type->getIterableValueType(), $resultTypes->getArrays()));
35+
$resultType = TypeCombinator::union(...array_map(static fn ($type) => $type->getIterableValueType(), $resultTypes->getArrays()));
3736

3837
return $resultTypes->isIterableAtLeastOnce()->yes() ? $resultType : TypeCombinator::addNull($resultType);
3938
}

0 commit comments

Comments
 (0)