@@ -204,15 +204,17 @@ public static function selectFromArgs(
204
204
];
205
205
}
206
206
207
- if (isset ($ args [0 ]) && (bool ) $ args [0 ]->getAttribute (ImplodeArgVisitor::ATTRIBUTE_NAME )) {
207
+ if (count ($ args ) <= 2 && (bool ) $ args [0 ]->getAttribute (ImplodeArgVisitor::ATTRIBUTE_NAME )) {
208
+ $ acceptor = $ parametersAcceptors [0 ];
209
+ $ parameters = $ acceptor ->getParameters ();
208
210
if (isset ($ args [1 ]) || $ args [0 ]->name ?->name === 'array ' ) {
209
211
$ parameters = [
210
- new NativeParameterReflection (' separator ' , false , new StringType (), PassedByReference::createNo (), false , null ),
211
- new NativeParameterReflection (' array ' , false , new ArrayType (new MixedType (), new MixedType ()), PassedByReference::createNo (), false , null ),
212
+ new NativeParameterReflection ($ parameters [ 0 ]-> getName () , false , new StringType (), PassedByReference::createNo (), false , null ),
213
+ new NativeParameterReflection ($ parameters [ 1 ]-> getName () , false , new ArrayType (new MixedType (), new MixedType ()), PassedByReference::createNo (), false , null ),
212
214
];
213
215
} else {
214
216
$ parameters = [
215
- new NativeParameterReflection (' array ' , false , new ArrayType (new MixedType (), new MixedType ()), PassedByReference::createNo (), false , null ),
217
+ new NativeParameterReflection ($ parameters [ 0 ]-> getName () , false , new ArrayType (new MixedType (), new MixedType ()), PassedByReference::createNo (), false , null ),
216
218
];
217
219
}
218
220
0 commit comments