@@ -204,15 +204,17 @@ public static function selectFromArgs(
204204 ];
205205 }
206206
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 ();
208210 if (isset ($ args [1 ]) || $ args [0 ]->name ?->name === 'array ' ) {
209211 $ 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 ),
212214 ];
213215 } else {
214216 $ 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 ),
216218 ];
217219 }
218220
0 commit comments