File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
Expand file tree Collapse file tree 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
111111
112112 public function isAcceptedBy (Type $ acceptingType , bool $ strictTypes ): AcceptsResult
113113 {
114+ if ($ acceptingType instanceof NonEmptyArrayType) {
115+ return AcceptsResult::createYes ();
116+ }
114117 return $ this ->isSubTypeOf ($ acceptingType )->toAcceptsResult ();
115118 }
116119
Original file line number Diff line number Diff line change @@ -122,6 +122,10 @@ public function isSubTypeOf(Type $otherType): IsSuperTypeOfResult
122122
123123 public function isAcceptedBy (Type $ acceptingType , bool $ strictTypes ): AcceptsResult
124124 {
125+ if ($ acceptingType instanceof NonEmptyArrayType) {
126+ return AcceptsResult::createYes ();
127+ }
128+
125129 return $ this ->isSubTypeOf ($ acceptingType )->toAcceptsResult ();
126130 }
127131
Original file line number Diff line number Diff line change @@ -76,12 +76,6 @@ public function getConstantStrings(): array
7676
7777 public function accepts (Type $ type , bool $ strictTypes ): AcceptsResult
7878 {
79- if ($ type instanceof HasOffsetType
80- || $ type instanceof HasOffsetValueType
81- ) {
82- return AcceptsResult::createYes ();
83- }
84-
8579 if ($ type instanceof CompoundType) {
8680 return $ type ->isAcceptedBy ($ this , $ strictTypes );
8781 }
You can’t perform that action at this time.
0 commit comments