Fixes #10372: Fixed console controller including DI arguments in help

This commit is contained in:
Sam Mousa
2015-12-22 10:03:31 +00:00
committed by Alexander Makarov
parent dcda2a2466
commit 18fc8db32f
3 changed files with 29 additions and 0 deletions

View File

@ -414,8 +414,13 @@ class Controller extends \yii\base\Controller
$params = isset($tags['param']) ? (array) $tags['param'] : [];
$args = [];
/** @var \ReflectionParameter $reflection */
foreach ($method->getParameters() as $i => $reflection) {
$name = $reflection->getName();
if ($reflection->getClass() !== null) {
continue;
}
$tag = isset($params[$i]) ? $params[$i] : '';
if (preg_match('/^(\S+)\s+(\$\w+\s+)?(.*)/s', $tag, $matches)) {
$type = $matches[1];