diff --git a/src/Analyser/MutatingScope.php b/src/Analyser/MutatingScope.php index c3a289ec9b6..bbefa0933c4 100644 --- a/src/Analyser/MutatingScope.php +++ b/src/Analyser/MutatingScope.php @@ -62,7 +62,6 @@ use PHPStan\TrinaryLogic; use PHPStan\Type\Accessory\AccessoryLiteralStringType; use PHPStan\Type\Accessory\AccessoryNonEmptyStringType; -use PHPStan\Type\Accessory\AccessoryNumericStringType; use PHPStan\Type\Accessory\NonEmptyArrayType; use PHPStan\Type\ArrayType; use PHPStan\Type\BenevolentUnionType; @@ -695,6 +694,8 @@ private function resolveType(Expr $node): Type if ($type->isNonEmptyString()->yes()) { $accessories[] = new AccessoryNonEmptyStringType(); } + // it is not useful to apply numeric and literal strings here. + // numeric string isn't certainly kept numeric: 3v4l.org/JERDB return TypeCombinator::intersect(...$accessories); }