mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-19 10:33:11 +00:00
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:
+1
-1
@@ -261,7 +261,7 @@ class Method
|
|||||||
$paramStr = '$' . $param->getName();
|
$paramStr = '$' . $param->getName();
|
||||||
$params[] = $paramStr;
|
$params[] = $paramStr;
|
||||||
if ($param->isOptional()) {
|
if ($param->isOptional()) {
|
||||||
$default = $param->getDefaultValue();
|
$default = $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null;
|
||||||
if (is_bool($default)) {
|
if (is_bool($default)) {
|
||||||
$default = $default ? 'true' : 'false';
|
$default = $default ? 'true' : 'false';
|
||||||
} elseif (is_array($default)) {
|
} elseif (is_array($default)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user