Skip to content

Commit

Permalink
Add variadic param name
Browse files Browse the repository at this point in the history
  • Loading branch information
codepluswander committed Mar 3, 2023
1 parent 04bf5e9 commit 4ec5f13
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/M6Web/Component/RedisMock/RedisMockFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,12 @@ protected function getMethodSignature(\ReflectionMethod $method)
$signature .= '&';
}
// paramName
$signature .= '$' . $parameter->getName();
$paramName = '$' . $parameter->getName();
// variadic
if ($parameter->isVariadic()) {
$paramName = '...' . $paramName;
}
$signature .= $paramName;
// defaultValue
if ($parameter->isDefaultValueAvailable()) {
$signature .= ' = ';
Expand Down

0 comments on commit 4ec5f13

Please sign in to comment.