Fix for functions with variadic arguments

The `php artisan ide-helper:generate` command fails with the following error for functions with variadic arguments:

    [ReflectionException]                                 
    Internal error: Failed to retrieve the default value
This commit is contained in:
Martin Wachocki
2014-10-08 10:06:59 -04:00
parent 89a17fc7b9
commit c0eb7e2d7e
+1 -1
View File
@@ -261,7 +261,7 @@ class Method
$paramStr = '$' . $param->getName();
$params[] = $paramStr;
if ($param->isOptional()) {
$default = $param->getDefaultValue();
$default = $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null;
if (is_bool($default)) {
$default = $default ? 'true' : 'false';
} elseif (is_array($default)) {