framework/console/Controller.php
public function getActionArgsHelp($action)
    {
        $method = $this->getActionMethodReflection($action);
        $tags = $this->parseDocCommentTags($method);
        $params = isset($tags['param']) ? (array) $tags['param'] : [];

        $args = [];

        /** @var \ReflectionParameter $reflection */
        foreach ($method->getParameters() as $i => $reflection) {
            if ($reflection->getClass() !== null) {
                continue;
            }
            $name = $reflection->getName();
            $tag = isset($params[$i]) ? $params[$i] : '';
            if (preg_match('/^(\S+)\s+(\$\w+\s+)?(.*)/s', $tag, $matches)) {
                $type = $matches[1];
                $comment = $matches[3];
            } else {
                $type = null;
                $comment = $tag;
            }
            if ($reflection->isDefaultValueAvailable()) {
                $args[$name] = [
                    'required' => false,
                    'type' => $type,
                    'default' => $reflection->getDefaultValue(),
                    'comment' => $comment,
                ];
            } else {
                $args[$name] = [
                    'required' => true,
                    'type' => $type,
                    'default' => null,
                    'comment' => $comment,
                ];
            }
        }

        return $args;
    }
public function getActionArgsHelp($action)
    {
        $method = $this->getActionMethodReflection($action);
        $tags = $this->parseDocCommentTags($method);
        $params = isset($tags['param']) ? (array) $tags['param'] : [];

        $args = [];

        /** @var \ReflectionParameter $reflection */
        foreach ($method->getParameters() as $i => $reflection) {
            if ($reflection->getClass() !== null) {
                continue;
            }
            $name = $reflection->getName();
            $tag = isset($params[$i]) ? $params[$i] : '';
            if (preg_match('/^(\S+)\s+(\$\w+\s+)?(.*)/s', $tag, $matches)) {
                $type = $matches[1];
                $comment = $matches[3];
            } else {
                $type = null;
                $comment = $tag;
            }
            if ($reflection->isDefaultValueAvailable()) {
                $args[$name] = [
                    'required' => false,
                    'type' => $type,
                    'default' => $reflection->getDefaultValue(),
                    'comment' => $comment,
                ];
            } else {
                $args[$name] = [
                    'required' => true,
                    'type' => $type,
                    'default' => null,
                    'comment' => $comment,
                ];
            }
        }

        return $args;
    }
public function getActionArgsHelp ( $ action ) { $ method = $ this -> getActionMethodReflection ( $ action ) ; $ tags = $ this -> parseDocCommentTags ( $ method ) ; $ params = isset ( $ tags [ 'param' ] ) ? ( array ) $ tags [ 'param' ] : [ ] ; $ args = [ ] ; /** @var \ReflectionParameter $reflection */ foreach ( $ method -> getParameters ( ) as $ i => $ reflection ) { if ( $ reflection -> getClass ( ) !== null ) { continue ; } $ name = $ reflection -> getName ( ) ; $ tag = isset ( $ params [ $ i ] ) ? $ params [ $ i ] : '' ; if ( preg_match ( '/^(\S+)\s+(\$\w+\s+)?(.*)/s' , $ tag , $ matches ) ) { $ type = $ matches [ 1 ] ; $ comment = $ matches [ 3 ] ; } else { $ type = null ; $ comment = $ tag ; } if ( $ reflection -> isDefaultValueAvailable ( ) ) { $ args [ $ name ] = [ 'required' => false , 'type' => $ type , 'default' => $ reflection -> getDefaultValue ( ) , 'comment' => $ comment , ] ; } else { $ args [ $ name ] = [ 'required' => true , 'type' => $ type , 'default' => null , 'comment' => $ comment , ] ; } } return $ args ; }
Returns the help information for the anonymous arguments for the action.

The returned value should be an array. The keys are the argument names, and the values are
the corresponding help information. Each value must be an array of the following structure:

- required: boolean, whether this argument is required.
- type: string, the PHP type of this argument.
- default: string, the default value of this argument
- comment: string, the comment of this argument

The default implementation will return the help information extracted from the doc-comment of
the parameters corresponding to the action method.

@param Action $action
@return array the help information of the action arguments
Returns the help information for the anonymous arguments for the action .