Skip to content

Commit adacab8

Browse files
committed
Cleanup
1 parent 4b1ad5d commit adacab8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Analyser/MutatingScope.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -1882,8 +1882,8 @@ private function resolveType(Expr $node): Type
18821882
$this->getType($node->var),
18831883
$node->name->name,
18841884
$node
1885-
) ?? new NeverType();
1886-
if ($returnType instanceof NeverType && !$returnType->isExplicit()) {
1885+
);
1886+
if ($returnType === null) {
18871887
return new ErrorType();
18881888
}
18891889
return $returnType;
@@ -1915,8 +1915,8 @@ private function resolveType(Expr $node): Type
19151915
$staticMethodCalledOnType,
19161916
$node->name->toString(),
19171917
$node
1918-
) ?? new NeverType();
1919-
if ($returnType instanceof NeverType && !$returnType->isExplicit()) {
1918+
);
1919+
if ($returnType === null) {
19201920
return new ErrorType();
19211921
}
19221922
return $returnType;
@@ -1936,8 +1936,8 @@ private function resolveType(Expr $node): Type
19361936
$this->getType($node->var),
19371937
$node->name->name,
19381938
$node
1939-
) ?? new NeverType();
1940-
if ($returnType instanceof NeverType) {
1939+
);
1940+
if ($returnType === null) {
19411941
return new ErrorType();
19421942
}
19431943
return $returnType;
@@ -1972,8 +1972,8 @@ private function resolveType(Expr $node): Type
19721972
$staticPropertyFetchedOnType,
19731973
$node->name->toString(),
19741974
$node
1975-
) ?? new NeverType();
1976-
if ($returnType instanceof NeverType) {
1975+
);
1976+
if ($returnType === null) {
19771977
return new ErrorType();
19781978
}
19791979
return $returnType;

0 commit comments

Comments
 (0)