File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434use PHPStan \Type \MixedType ;
3535use PHPStan \Type \NullType ;
3636use PHPStan \Type \ObjectType ;
37- use PHPStan \Type \ObjectWithoutClassType ;
3837use PHPStan \Type \StaticType ;
3938use PHPStan \Type \StringType ;
4039use PHPStan \Type \Traits \ConstantScalarTypeTrait ;
@@ -152,9 +151,6 @@ public function isSuperTypeOf(Type $type): TrinaryLogic
152151 }
153152
154153 $ genericType = $ type ->getGenericType ();
155- if ($ genericType instanceof MixedType) {
156- return TrinaryLogic ::createMaybe ();
157- }
158154 if ($ genericType instanceof StaticType) {
159155 $ genericType = $ genericType ->getStaticObjectType ();
160156 }
Original file line number Diff line number Diff line change 1212use PHPStan \Type \CompoundType ;
1313use PHPStan \Type \Constant \ConstantStringType ;
1414use PHPStan \Type \IntersectionType ;
15- use PHPStan \Type \MixedType ;
1615use PHPStan \Type \NeverType ;
1716use PHPStan \Type \ObjectType ;
1817use PHPStan \Type \ObjectWithoutClassType ;
@@ -92,11 +91,11 @@ public function isSuperTypeOf(Type $type): TrinaryLogic
9291 }
9392
9493 if ($ type instanceof ConstantStringType) {
95- $ genericType = $ this ->type ;
96- if ($ genericType instanceof MixedType) {
97- return $ type ->isClassStringType ();
94+ if ($ type ->isClassStringType ()->no ()) {
95+ return TrinaryLogic ::createNo ();
9896 }
9997
98+ $ genericType = $ this ->type ;
10099 if ($ genericType instanceof StaticType) {
101100 $ genericType = $ genericType ->getStaticObjectType ();
102101 }
You can’t perform that action at this time.
0 commit comments