mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-19 10:33:11 +00:00
Only scan public methods
__call magic kicks in if the function is protected.
This commit is contained in:
@@ -221,13 +221,13 @@ exit('Only to be used as an helper for your IDE');\n\n";
|
|||||||
}
|
}
|
||||||
$reflection = new \ReflectionClass($class);
|
$reflection = new \ReflectionClass($class);
|
||||||
|
|
||||||
$methods = $reflection->getMethods();
|
$methods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC);
|
||||||
if($methods)
|
if($methods)
|
||||||
{
|
{
|
||||||
foreach ($methods as $method)
|
foreach ($methods as $method)
|
||||||
{
|
{
|
||||||
if(!in_array($method->name, $usedMethods)){
|
if(!in_array($method->name, $usedMethods)){
|
||||||
if($method->isPublic() && $addOutput){
|
if( $addOutput){
|
||||||
$output .= $this->parseMethod($method, $alias);
|
$output .= $this->parseMethod($method, $alias);
|
||||||
}
|
}
|
||||||
$usedMethods[] = $method->name;
|
$usedMethods[] = $method->name;
|
||||||
|
|||||||
Reference in New Issue
Block a user