From d042c6ea8e7d017aaba924b1d48be15436d7ccaa Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Fri, 28 Jun 2013 13:24:24 +0200 Subject: [PATCH] Only scan public methods __call magic kicks in if the function is protected. --- src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php index b5f8863..ba6c716 100755 --- a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php +++ b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php @@ -221,13 +221,13 @@ exit('Only to be used as an helper for your IDE');\n\n"; } $reflection = new \ReflectionClass($class); - $methods = $reflection->getMethods(); + $methods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC); if($methods) { foreach ($methods as $method) { if(!in_array($method->name, $usedMethods)){ - if($method->isPublic() && $addOutput){ + if( $addOutput){ $output .= $this->parseMethod($method, $alias); } $usedMethods[] = $method->name;