File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1882,8 +1882,8 @@ private function resolveType(Expr $node): Type
1882
1882
$ this ->getType ($ node ->var ),
1883
1883
$ node ->name ->name ,
1884
1884
$ node
1885
- ) ?? new NeverType () ;
1886
- if ($ returnType instanceof NeverType && ! $ returnType -> isExplicit () ) {
1885
+ );
1886
+ if ($ returnType === null ) {
1887
1887
return new ErrorType ();
1888
1888
}
1889
1889
return $ returnType ;
@@ -1915,8 +1915,8 @@ private function resolveType(Expr $node): Type
1915
1915
$ staticMethodCalledOnType ,
1916
1916
$ node ->name ->toString (),
1917
1917
$ node
1918
- ) ?? new NeverType () ;
1919
- if ($ returnType instanceof NeverType && ! $ returnType -> isExplicit () ) {
1918
+ );
1919
+ if ($ returnType === null ) {
1920
1920
return new ErrorType ();
1921
1921
}
1922
1922
return $ returnType ;
@@ -1936,8 +1936,8 @@ private function resolveType(Expr $node): Type
1936
1936
$ this ->getType ($ node ->var ),
1937
1937
$ node ->name ->name ,
1938
1938
$ node
1939
- ) ?? new NeverType () ;
1940
- if ($ returnType instanceof NeverType ) {
1939
+ );
1940
+ if ($ returnType === null ) {
1941
1941
return new ErrorType ();
1942
1942
}
1943
1943
return $ returnType ;
@@ -1972,8 +1972,8 @@ private function resolveType(Expr $node): Type
1972
1972
$ staticPropertyFetchedOnType ,
1973
1973
$ node ->name ->toString (),
1974
1974
$ node
1975
- ) ?? new NeverType () ;
1976
- if ($ returnType instanceof NeverType ) {
1975
+ );
1976
+ if ($ returnType === null ) {
1977
1977
return new ErrorType ();
1978
1978
}
1979
1979
return $ returnType ;
You can’t perform that action at this time.
0 commit comments