From 13e65d3885cd480e43191e0094d86d9afdc56d17 Mon Sep 17 00:00:00 2001 From: ockle Date: Wed, 12 Oct 2016 21:53:42 +0100 Subject: [PATCH] if model scope method parameters have typehints, add them to the docblock --- src/Console/ModelsCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 70f1605..e91822a 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -622,7 +622,8 @@ class ModelsCommand extends Command $paramsWithDefault = array(); /** @var \ReflectionParameter $param */ foreach ($method->getParameters() as $param) { - $paramStr = '$' . $param->getName(); + $paramClass = $param->getClass(); + $paramStr = (!is_null($paramClass) ? '\\' . $paramClass->getName() . ' ' : '') . '$' . $param->getName(); $params[] = $paramStr; if ($param->isOptional() && $param->isDefaultValueAvailable()) { $default = $param->getDefaultValue();