@@ -292,7 +292,7 @@ public function getFileDescription(): string
292292 }
293293
294294 $ traitReflection = $ this ->context ->getTraitReflection ();
295- if ($ traitReflection ->getFileName () === false ) {
295+ if ($ traitReflection ->getFileName () === null ) {
296296 throw new \PHPStan \ShouldNotHappenException ();
297297 }
298298
@@ -2588,7 +2588,7 @@ private function resolveExactName(Name $name): ?string
25882588 return null ;
25892589 }
25902590 $ currentClassReflection = $ this ->getClassReflection ();
2591- if ($ currentClassReflection ->getParentClass () !== false ) {
2591+ if ($ currentClassReflection ->getParentClass () !== null ) {
25922592 return $ currentClassReflection ->getParentClass ()->getName ();
25932593 }
25942594 return null ;
@@ -2614,7 +2614,7 @@ public function resolveName(Name $name): string
26142614 return $ this ->getClassReflection ()->getName ();
26152615 } elseif ($ originalClass === 'parent ' ) {
26162616 $ currentClassReflection = $ this ->getClassReflection ();
2617- if ($ currentClassReflection ->getParentClass () !== false ) {
2617+ if ($ currentClassReflection ->getParentClass () !== null ) {
26182618 return $ currentClassReflection ->getParentClass ()->getName ();
26192619 }
26202620 }
@@ -3385,7 +3385,7 @@ public function getFunctionType($type, bool $isNullable, bool $isVariadic): Type
33853385 $ className = (string ) $ type ;
33863386 $ lowercasedClassName = strtolower ($ className );
33873387 if ($ lowercasedClassName === 'parent ' ) {
3388- if ($ this ->isInClass () && $ this ->getClassReflection ()->getParentClass () !== false ) {
3388+ if ($ this ->isInClass () && $ this ->getClassReflection ()->getParentClass () !== null ) {
33893389 return new ObjectType ($ this ->getClassReflection ()->getParentClass ()->getName ());
33903390 }
33913391
0 commit comments