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.
This commit is contained in:
Ben Claar
2013-08-23 16:25:03 -05:00
parent afeaf2f28b
commit 5a0f8f1b64
@@ -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')){