From 5a0f8f1b6454b1ddd9ae387e974f2b694df44b9e Mon Sep 17 00:00:00 2001 From: Ben Claar Date: Fri, 23 Aug 2013 16:25:03 -0500 Subject: [PATCH] Include return value when generating scope methods It's handy to specify return values in phpDoc comments. This patch sets the return value to the containing class. --- src/Barryvdh/LaravelIdeHelper/ModelsCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php b/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php index f046abe..e098cf9 100644 --- a/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php +++ b/src/Barryvdh/LaravelIdeHelper/ModelsCommand.php @@ -238,7 +238,7 @@ class ModelsCommand extends Command { $args = $this->getParameters($reflection); //Remove the first ($query) argument array_shift($args); - $this->setMethod($name, 'static', $args); + $this->setMethod($name, "static " . $reflection->class, $args); } }elseif(!method_exists('Eloquent', $method) && !\Str::startsWith($method, 'get')){