Skip to content

Commit 24246f3

Browse files
committed
treatPhpDocTypesAsCertain is not necessary in BitwiseNot handling
1 parent 5f5de22 commit 24246f3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Analyser/MutatingScope.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -571,11 +571,7 @@ private function resolveType(Expr $node): Type
571571
}
572572

573573
if ($node instanceof \PhpParser\Node\Expr\BitwiseNot) {
574-
if ($this->treatPhpDocTypesAsCertain) {
575-
$exprType = $this->getType($node->expr);
576-
} else {
577-
$exprType = $this->getNativeType($node->expr);
578-
}
574+
$exprType = $this->getType($node->expr);
579575
return TypeTraverser::map($exprType, static function (Type $type, callable $traverse): Type {
580576
if ($type instanceof UnionType || $type instanceof IntersectionType) {
581577
return $traverse($type);

0 commit comments

Comments
 (0)