Merge pull request #7 from syphernl/patch-1

Check if array of methods is not empty
This commit is contained in:
barryvdh
2013-04-28 08:33:46 -07:00
@@ -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";