File tree 3 files changed +17
-0
lines changed
tests/Elasticsearch/Filter
3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ public function getDescription(string $resourceClass): array
96
96
'property ' => $ property ,
97
97
'type ' => $ hasAssociation ? 'string ' : $ this ->getPhpType ($ type ),
98
98
'required ' => false ,
99
+ 'is_collection ' => str_ends_with ((string ) $ filterParameterName , '[] ' ),
99
100
];
100
101
}
101
102
}
Original file line number Diff line number Diff line change @@ -176,41 +176,49 @@ public function testGetDescription(): void
176
176
'property ' => 'id ' ,
177
177
'type ' => 'int ' ,
178
178
'required ' => false ,
179
+ 'is_collection ' => false ,
179
180
],
180
181
'id[] ' => [
181
182
'property ' => 'id ' ,
182
183
'type ' => 'int ' ,
183
184
'required ' => false ,
185
+ 'is_collection ' => true ,
184
186
],
185
187
'name ' => [
186
188
'property ' => 'name ' ,
187
189
'type ' => 'string ' ,
188
190
'required ' => false ,
191
+ 'is_collection ' => false ,
189
192
],
190
193
'name[] ' => [
191
194
'property ' => 'name ' ,
192
195
'type ' => 'string ' ,
193
196
'required ' => false ,
197
+ 'is_collection ' => true ,
194
198
],
195
199
'date ' => [
196
200
'property ' => 'date ' ,
197
201
'type ' => \DateTimeInterface::class,
198
202
'required ' => false ,
203
+ 'is_collection ' => false ,
199
204
],
200
205
'date[] ' => [
201
206
'property ' => 'date ' ,
202
207
'type ' => \DateTimeInterface::class,
203
208
'required ' => false ,
209
+ 'is_collection ' => true ,
204
210
],
205
211
'weird ' => [
206
212
'property ' => 'weird ' ,
207
213
'type ' => 'string ' ,
208
214
'required ' => false ,
215
+ 'is_collection ' => false ,
209
216
],
210
217
'weird[] ' => [
211
218
'property ' => 'weird ' ,
212
219
'type ' => 'string ' ,
213
220
'required ' => false ,
221
+ 'is_collection ' => true ,
214
222
],
215
223
],
216
224
$ matchFilter ->getDescription (Foo::class)
Original file line number Diff line number Diff line change @@ -176,41 +176,49 @@ public function testGetDescription(): void
176
176
'property ' => 'id ' ,
177
177
'type ' => 'int ' ,
178
178
'required ' => false ,
179
+ 'is_collection ' => false ,
179
180
],
180
181
'id[] ' => [
181
182
'property ' => 'id ' ,
182
183
'type ' => 'int ' ,
183
184
'required ' => false ,
185
+ 'is_collection ' => true ,
184
186
],
185
187
'name ' => [
186
188
'property ' => 'name ' ,
187
189
'type ' => 'string ' ,
188
190
'required ' => false ,
191
+ 'is_collection ' => false ,
189
192
],
190
193
'name[] ' => [
191
194
'property ' => 'name ' ,
192
195
'type ' => 'string ' ,
193
196
'required ' => false ,
197
+ 'is_collection ' => true ,
194
198
],
195
199
'date ' => [
196
200
'property ' => 'date ' ,
197
201
'type ' => \DateTimeInterface::class,
198
202
'required ' => false ,
203
+ 'is_collection ' => false ,
199
204
],
200
205
'date[] ' => [
201
206
'property ' => 'date ' ,
202
207
'type ' => \DateTimeInterface::class,
203
208
'required ' => false ,
209
+ 'is_collection ' => true ,
204
210
],
205
211
'weird ' => [
206
212
'property ' => 'weird ' ,
207
213
'type ' => 'string ' ,
208
214
'required ' => false ,
215
+ 'is_collection ' => false ,
209
216
],
210
217
'weird[] ' => [
211
218
'property ' => 'weird ' ,
212
219
'type ' => 'string ' ,
213
220
'required ' => false ,
221
+ 'is_collection ' => true ,
214
222
],
215
223
],
216
224
$ termFilter ->getDescription (Foo::class)
You can’t perform that action at this time.
0 commit comments