mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 10:07:12 +00:00
Add splat operator (...) support (#860)
* Add splat operator (...) support * Add test
This commit is contained in:
committed by
Barry vd. Heuvel
parent
fcf3fae860
commit
e7734d3c20
+2
-2
@@ -314,9 +314,9 @@ class Method
|
||||
$params = array();
|
||||
$paramsWithDefault = array();
|
||||
foreach ($method->getParameters() as $param) {
|
||||
$paramStr = '$' . $param->getName();
|
||||
$paramStr = $param->isVariadic() ? '...$' . $param->getName() : '$' . $param->getName();
|
||||
$params[] = $paramStr;
|
||||
if ($param->isOptional()) {
|
||||
if ($param->isOptional() && !$param->isVariadic()) {
|
||||
$default = $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null;
|
||||
if (is_bool($default)) {
|
||||
$default = $default ? 'true' : 'false';
|
||||
|
||||
Reference in New Issue
Block a user