Skip to content

Commit

Permalink
treatPhpDocTypesAsCertain is not necessary in BitwiseNot handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 20, 2020
1 parent 5f5de22 commit 24246f3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Analyser/MutatingScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -571,11 +571,7 @@ private function resolveType(Expr $node): Type
}

if ($node instanceof \PhpParser\Node\Expr\BitwiseNot) {
if ($this->treatPhpDocTypesAsCertain) {
$exprType = $this->getType($node->expr);
} else {
$exprType = $this->getNativeType($node->expr);
}
$exprType = $this->getType($node->expr);
return TypeTraverser::map($exprType, static function (Type $type, callable $traverse): Type {
if ($type instanceof UnionType || $type instanceof IntersectionType) {
return $traverse($type);
Expand Down

0 comments on commit 24246f3

Please sign in to comment.