File tree 3 files changed +7
-6
lines changed
3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,9 @@ public function isSubTypeOf(Type $otherType): IsSuperTypeOfResult
111
111
112
112
public function isAcceptedBy (Type $ acceptingType , bool $ strictTypes ): AcceptsResult
113
113
{
114
+ if ($ acceptingType instanceof NonEmptyArrayType) {
115
+ return AcceptsResult::createYes ();
116
+ }
114
117
return $ this ->isSubTypeOf ($ acceptingType )->toAcceptsResult ();
115
118
}
116
119
Original file line number Diff line number Diff line change @@ -122,6 +122,10 @@ public function isSubTypeOf(Type $otherType): IsSuperTypeOfResult
122
122
123
123
public function isAcceptedBy (Type $ acceptingType , bool $ strictTypes ): AcceptsResult
124
124
{
125
+ if ($ acceptingType instanceof NonEmptyArrayType) {
126
+ return AcceptsResult::createYes ();
127
+ }
128
+
125
129
return $ this ->isSubTypeOf ($ acceptingType )->toAcceptsResult ();
126
130
}
127
131
Original file line number Diff line number Diff line change @@ -76,12 +76,6 @@ public function getConstantStrings(): array
76
76
77
77
public function accepts (Type $ type , bool $ strictTypes ): AcceptsResult
78
78
{
79
- if ($ type instanceof HasOffsetType
80
- || $ type instanceof HasOffsetValueType
81
- ) {
82
- return AcceptsResult::createYes ();
83
- }
84
-
85
79
if ($ type instanceof CompoundType) {
86
80
return $ type ->isAcceptedBy ($ this , $ strictTypes );
87
81
}
You can’t perform that action at this time.
0 commit comments