From 12845b38f04edc8340935bf9db80db473894fe2b Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Thu, 6 Jun 2013 13:45:32 +0200 Subject: [PATCH] Use declaring class When function is inherited, link to the original class. --- src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php index 6bbab52..83f19f7 100755 --- a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php +++ b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php @@ -195,7 +195,8 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n"; { if(!in_array($method->name, $usedMethods)){ $static = !in_array($method->name, $nonstaticMethods); - $output .= $this->parseMethod($method, $alias, $root, $static); + $declaringClass = $method->getDeclaringClass(); + $output .= $this->parseMethod($method, $alias, $declaringClass->name, $static); $usedMethods[] = $method->name; } }