protected function showHelp(): bool
    {
        if (!$definition = $this->getDefinition()) {
            return false;
        }

        // if has InputDefinition object. (The comment of the command will not be parsed and used at this time.)
        $help = $definition->getSynopsis();
        // build usage
        $help['usage:'] = \sprintf(
            '%s %s %s',
            $this->getScriptName(),
            $this->getCommandName(),
            $help['usage:']
        );
        // align global options
        $help['global options:'] = FormatUtil::alignOptions(Application::getGlobalOptions());

        if (empty($help[0]) && $this->isAlone()) {
            $help[0] = self::getDescription();
        }

        if (empty($help[0])) {
            $help[0] = 'No description message for the command';
        }

        // output description
        $this->write(\ucfirst($help[0]) . \PHP_EOL);
        unset($help[0]);

        $this->output->mList($help, ['sepChar' => '  ']);
        return true;
    }
protected function showHelp(): bool
    {
        if (!$definition = $this->getDefinition()) {
            return false;
        }

        // if has InputDefinition object. (The comment of the command will not be parsed and used at this time.)
        $help = $definition->getSynopsis();
        // build usage
        $help['usage:'] = \sprintf(
            '%s %s %s',
            $this->getScriptName(),
            $this->getCommandName(),
            $help['usage:']
        );
        // align global options
        $help['global options:'] = FormatUtil::alignOptions(Application::getGlobalOptions());

        if (empty($help[0]) && $this->isAlone()) {
            $help[0] = self::getDescription();
        }

        if (empty($help[0])) {
            $help[0] = 'No description message for the command';
        }

        // output description
        $this->write(\ucfirst($help[0]) . \PHP_EOL);
        unset($help[0]);

        $this->output->mList($help, ['sepChar' => '  ']);
        return true;
    }
protected function showHelp ( ) : bool { if ( ! $ definition = $ this -> getDefinition ( ) ) { return false ; } // if has InputDefinition object. (The comment of the command will not be parsed and used at this time.) $ help = $ definition -> getSynopsis ( ) ; // build usage $ help [ 'usage:' ] = \ sprintf ( '%s %s %s' , $ this -> getScriptName ( ) , $ this -> getCommandName ( ) , $ help [ 'usage:' ] ) ; // align global options $ help [ 'global options:' ] = FormatUtil :: alignOptions ( Application :: getGlobalOptions ( ) ) ; if ( empty ( $ help [ 0 ] ) && $ this -> isAlone ( ) ) { $ help [ 0 ] = self :: getDescription ( ) ; } if ( empty ( $ help [ 0 ] ) ) { $ help [ 0 ] = 'No description message for the command' ; } // output description $ this -> write ( \ ucfirst ( $ help [ 0 ] ) . \ PHP_EOL ) ; unset ( $ help [ 0 ] ) ; $ this -> output -> mList ( $ help , [ 'sepChar' => '  ' ] ) ; return true ; }
Display help information
@return bool
Display help information