Skip to content

Commit 9076b6f

Browse files
committed
Fix
1 parent 53a5171 commit 9076b6f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Type/Php/IsNumericFunctionTypeSpecifyingExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use PHPStan\Type\FloatType;
1313
use PHPStan\Type\FunctionTypeSpecifyingExtension;
1414
use PHPStan\Type\IntegerType;
15+
use PHPStan\Type\MixedType;
1516
use PHPStan\Type\StringType;
1617
use PHPStan\Type\UnionType;
1718

@@ -35,7 +36,7 @@ public function specifyTypes(FunctionReflection $functionReflection, FuncCall $n
3536
}
3637

3738
$argType = $scope->getType($node->args[0]->value);
38-
if (!(new StringType())->isSuperTypeOf($argType)->no()) {
39+
if (!(new StringType())->isSuperTypeOf($argType)->no() && !$argType instanceof MixedType) {
3940
return new SpecifiedTypes([], []);
4041
}
4142

0 commit comments

Comments
 (0)