mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +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();
|
||||
$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)) {
|
||||
|
||||
Reference in New Issue
Block a user