File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
lib/internal/Magento/Framework
Interception/Code/Generator Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ class ClassGenerator extends \Zend\Code\Generator\ClassGenerator implements
59
59
'type ' => 'setType ' ,
60
60
'defaultValue ' => 'setDefaultValue ' ,
61
61
'passedByReference ' => 'setPassedByReference ' ,
62
+ 'variadic ' => 'setVariadic ' ,
62
63
];
63
64
64
65
/**
Original file line number Diff line number Diff line change @@ -313,7 +313,8 @@ protected function _getMethodParameterInfo(\ReflectionParameter $parameter)
313
313
$ parameterInfo = [
314
314
'name ' => $ parameter ->getName (),
315
315
'passedByReference ' => $ parameter ->isPassedByReference (),
316
- 'type ' => $ parameter ->getType ()
316
+ 'type ' => $ parameter ->getType (),
317
+ 'variadic ' => $ parameter ->isVariadic ()
317
318
];
318
319
319
320
if ($ parameter ->isArray ()) {
Original file line number Diff line number Diff line change @@ -130,7 +130,13 @@ protected function _getParameterList(array $parameters)
130
130
', ' ,
131
131
array_map (
132
132
function ($ item ) {
133
- return "$ " . $ item ['name ' ];
133
+ $ output = '' ;
134
+ if ($ item ['variadic ' ]) {
135
+ $ output .= '... ' ;
136
+ }
137
+
138
+ $ output .="\${$ item ['name ' ]}" ;
139
+ return $ output ;
134
140
},
135
141
$ parameters
136
142
)
You can’t perform that action at this time.
0 commit comments