File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 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
108108 if ($ type instanceof TemplateType) {
109109 return $ type ;
110110 }
111- if ($ type ->isObject ()->yes ()) {
112- if (count ($ type ->getObjectClassReflections ()) === 0 ) {
111+ if ($ type instanceof ObjectType) {
112+ $ classReflection = $ type ->getClassReflection ();
113+ if ($ classReflection === null ) {
113114 return $ type ;
114115 }
115- $ classReflection = $ type ->getObjectClassReflections ()[0 ];
116116 if (in_array ($ classReflection ->getName (), self ::ITERABLE_GENERIC_CLASS_NAMES , true )) {
117117 // checked by getIterableTypesWithMissingValueTypehint() already
118118 return $ type ;
@@ -128,7 +128,7 @@ public function getNonGenericObjectTypesWithGenericClass(Type $type): array
128128 }
129129
130130 $ resolvedType = TemplateTypeHelper::resolveToBounds ($ type );
131- if (!$ resolvedType-> isObject ()-> yes () ) {
131+ if (!$ resolvedType instanceof ObjectType ) {
132132 throw new ShouldNotHappenException ();
133133 }
134134
You can’t perform that action at this time.
0 commit comments