File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -108,11 +108,11 @@ public function getNonGenericObjectTypesWithGenericClass(Type $type): array
108
108
if ($ type instanceof TemplateType) {
109
109
return $ type ;
110
110
}
111
- if ($ type ->isObject ()->yes ()) {
112
- if (count ($ type ->getObjectClassReflections ()) === 0 ) {
111
+ if ($ type instanceof ObjectType) {
112
+ $ classReflection = $ type ->getClassReflection ();
113
+ if ($ classReflection === null ) {
113
114
return $ type ;
114
115
}
115
- $ classReflection = $ type ->getObjectClassReflections ()[0 ];
116
116
if (in_array ($ classReflection ->getName (), self ::ITERABLE_GENERIC_CLASS_NAMES , true )) {
117
117
// checked by getIterableTypesWithMissingValueTypehint() already
118
118
return $ type ;
@@ -128,7 +128,7 @@ public function getNonGenericObjectTypesWithGenericClass(Type $type): array
128
128
}
129
129
130
130
$ resolvedType = TemplateTypeHelper::resolveToBounds ($ type );
131
- if (!$ resolvedType-> isObject ()-> yes () ) {
131
+ if (!$ resolvedType instanceof ObjectType ) {
132
132
throw new ShouldNotHappenException ();
133
133
}
134
134
You can’t perform that action at this time.
0 commit comments