Skip to content

Commit e4ad097

Browse files
author
shiomachi
committed
fix
1 parent 27b10db commit e4ad097

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Type/Php/RoundFunctionReturnTypeExtension.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
use PHPStan\Type\StringType;
2222
use PHPStan\Type\Type;
2323
use PHPStan\Type\TypeCombinator;
24-
use function array_map;
2524
use function ceil;
2625
use function count;
2726
use function floor;
@@ -107,7 +106,6 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
107106
// PHP 8 fatals if the parameter is not an integer or float.
108107
return new NeverType(true);
109108
}
110-
111109
} elseif ($firstArgType->isArray()->yes()) {
112110
// PHP 7 returns false if the parameter is an array.
113111
return new ConstantBooleanType(false);
@@ -174,7 +172,7 @@ public function resolveConstantType(string $functionName, array $args, Scope $sc
174172
}
175173

176174
if (count($returnValueTypes) >= 1) {
177-
return TypeCombinator::union(...array_map(static fn ($l) => $l, $returnValueTypes));
175+
return TypeCombinator::union(...$returnValueTypes);
178176
}
179177

180178
return null;

0 commit comments

Comments
 (0)