mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-19 02:23:11 +00:00
Update GeneratorCommand.php
Adds a check to prevent a foreach on an empty list of methods, which raises an Exception and stops generating the IDE Helper file.
This commit is contained in:
@@ -168,10 +168,12 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n";
|
|||||||
if(!in_array($alias, $onlyExtend) || $sublime)
|
if(!in_array($alias, $onlyExtend) || $sublime)
|
||||||
{
|
{
|
||||||
$methods = $d->getMethods();
|
$methods = $d->getMethods();
|
||||||
|
if($methods)
|
||||||
foreach ($methods as $method)
|
|
||||||
{
|
{
|
||||||
$output .= $this->parseMethod($method, $root, $sublime);
|
foreach ($methods as $method)
|
||||||
|
{
|
||||||
|
$output .= $this->parseMethod($method, $root, $sublime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$output .= " }\n}\n\n";
|
$output .= " }\n}\n\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user