Skip to content

Commit ed71260

Browse files
authored
Update variable assignment for callable check
Refactor variable assignment for callable type check.
1 parent 55d2d9e commit ed71260

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Type/Php/ArrayMapFunctionReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
4141
if ($numArgs < 2) {
4242
return null;
4343
}
44-
$x=1;
4544

4645
$singleArrayArgument = !isset($functionCall->getArgs()[2]);
4746
$callback = $functionCall->getArgs()[0]->value;
4847
$callableType = $scope->getType($callback);
4948
$callableIsNull = $callableType->isNull()->yes();
49+
$x=$callableType->isNull()->yes();
5050

5151
if ($callableType->isCallable()->yes()) {
5252
$valueType = $scope->getType(new FuncCall(

0 commit comments

Comments
 (0)