Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
clxmstaab committed May 10, 2022
1 parent 2fa51e0 commit 1db480e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Analyser/MutatingScope.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 1db480e

Please sign in to comment.