the command list

@return array
@throws \ReflectionException
515085
private function parserCmdAndDesc(): array
    {
        $commands = [];
        $collector = CommandCollector::getCollector();

        /* @var \Swoft\Console\Router\HandlerMapping $route */
        $route = App::getBean('commandRoute');

        foreach ($collector as $className => $command) {
            if (!$command['enabled']) {
                continue;
            }

            $rc = new \ReflectionClass($className);
            $docComment = $rc->getDocComment();
            $docAry = DocBlockHelper::getTags($docComment);

            $prefix = $command['name'];
            $prefix = $route->getPrefix($prefix, $className);
            $commands[$prefix] = StringHelper::ucfirst($docAry['Description']);
        }

        // sort commands
        ksort($commands);

        return $commands;
    }
1072828
public function getCommands(): array
    {
        $commands           = [
            $this->container->get(GenerateRelationsCommand::class),
            $this->container->get(GenerateEntityCommand::class),
            $this->container->get(SetRelationCommand::class),
            $this->container->get(GenerateFieldCommand::class),
            $this->container->get(SetFieldCommand::class),
            $this->container->get(SetEmbeddableCommand::class),
            $this->container->get(GenerateEmbeddableFromArchetypeCommand::class),
            $this->container->get(GenerateEmbeddableSkeletonCommand::class),
            $this->container->get(RemoveUnusedRelationsCommand::class),
            $this->container->get(OverrideCreateCommand::class),
            $this->container->get(OverridesUpdateCommand::class),
            $this->container->get(CreateConstraintCommand::class),
            $this->container->get(FinaliseBuildCommand::class),
            $this->container->get(CreateConstraintCommand::class),
        ];
        $migrationsCommands = [
            $this->container->get(ExecuteCommand::class),
            $this->container->get(GenerateCommand::class),
            $this->container->get(LatestCommand::class),
            $this->container->get(MigrateCommand::class),
            $this->container->get(DiffCommand::class),
            $this->container->get(UpToDateCommand::class),
            $this->container->get(StatusCommand::class),
            $this->container->get(VersionCommand::class),
        ];
        foreach ($migrationsCommands as $command) {
            $commands[] = $this->addMigrationsConfig($command);
        }

        return $commands;
    }
748705
private function instantiateParameters(Command $command) {
        return array_map(function(\ReflectionParameter $param) {
            return $this->container->get($param->getType()->getName());
        }, (new ReflectionClass(get_class($command)))->getMethod('execute')->getParameters());
    }
457747
protected function getData($command)
    {
        $data = [];

        foreach ((new ReflectionClass($command))->getProperties(ReflectionProperty::IS_PUBLIC) as $property) {
            $name = $property->getName();
            $value = $property->getValue($command);

            if (in_array($name, ['rules', 'validationMessages'], true)) {
                continue;
            }

            $data[$name] = $value;
        }

        return $data;
    }
263169
public function annotationVars(): array
    {
        // e.g: `more info see {name}:index`
        return [
            // 'name' => self::getName(),
            // 'group' => self::getName(),
            'workDir' => input()->getPwd(),
            'script' => input()->getScript(), // bin/app
            'command' => input()->getCommand(), // demo OR home:test
            'fullCommand' => input()->getScript() . ' ' . input()->getCommand(),
        ];
    }
525016
public function getCommandCallbacks($command = null)
    {
        $result = array();
        if($command)
        {
            if(isset($this->__command_callbacks[$command])) {
                $result = $this->__command_callbacks[$command];
            }
        }
        else $result = $this->__command_callbacks;

        return $result;
    }
1084642
private function getCommandName()
    {
        $className   = implode('', array_slice(explode('\\', get_class($this)), -1));
        $commandName = str_replace('command', '', strtolower($className));

        return $commandName;
    }
973942
public function listCommand()
    {
        $users = $this->userService->getUsers();

        $tableRows = [];
        $headerRow = ['Name', 'Email', 'Account(s)', 'Role(s)', 'Active'];

        foreach ($users as $user) {
            $tableRows[] = $this->getTableRowForUser($user);
        }

        $this->output->outputTable($tableRows, $headerRow);
    }
1050675
public function getCommands()
    {
        foreach ($this->commands as $command) {
            if ($command instanceof \Traversable) {
                //Nested commands
                yield from $command;
            }

            yield $command;
        }
    }
300847
public function listCommand()
    {
        if ($this->clonePresets) {
            foreach ($this->clonePresets as $presetName => $presetConfiguration) {
                $this->renderHeadLine($presetName);
                $presetConfigurationAsYaml = Yaml::dump($presetConfiguration);
                $lines = explode(PHP_EOL, $presetConfigurationAsYaml);
                foreach ($lines as $line) {
                    $this->renderLine($line);
                }
            }
        }
    }
992133
public function getShellList()
    {
        $skipFiles = ['app'];
        $hiddenCommands = ['command_list', 'completion'];
        $plugins = Plugin::loaded();
        $shellList = array_fill_keys($plugins, null) + ['CORE' => null, 'app' => null];

        $appPath = App::path('Shell');
        $shellList = $this->_findShells($shellList, $appPath[0], 'app', $skipFiles);

        $appPath = App::path('Command');
        $shellList = $this->_findShells($shellList, $appPath[0], 'app', $skipFiles);

        $skipCore = array_merge($skipFiles, $hiddenCommands, $shellList['app']);
        $corePath = dirname(__DIR__);
        $shellList = $this->_findShells($shellList, $corePath, 'CORE', $skipCore);

        $corePath = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'Command';
        $shellList = $this->_findShells($shellList, $corePath, 'CORE', $skipCore);

        foreach ($plugins as $plugin) {
            $pluginPath = Plugin::classPath($plugin) . 'Shell';
            $shellList = $this->_findShells($shellList, $pluginPath, $plugin, []);
        }

        return array_filter($shellList);
    }
1354878
protected function getDefaultCommands() : array
    {
        return [
            new Cmd\Help(),
            new Cmd\Install(),
            new Cmd\Configuration(),
            new Cmd\Add(),
            new Cmd\Disable(),
            new Cmd\Enable(),
            new Cmd\Run(),
        ];
    }
178126
protected function getBitrixCommands()
    {
        return array_merge(
            [
                new OnCronCommand(),
                new ExecuteCommand(),
                new ClearCommand(),
                new InitCommand(),
                new ReIndexCommand(),
                new ExportCommand(),
                new ImportCommand(),
                new ReIndexCommand(),
            ],
            Module\ModuleCommand::getCommands()
        );
    }
343369
function getList() {
  if(!COMMAND_LIST) {
    COMMAND_LIST = [];
    for(var z in this.execs) {
      COMMAND_LIST.push(this.execs[z].definition.getDefinition());
    }
  }
  return COMMAND_LIST;
}
1150167
public function listCommand()
    {
        $repositories = $this->driverComposite->getRepositories();
        foreach ($repositories as $repository) {
            $this->outputLine($repository->getRepositoryUrl());
        }
    }
1317709
public function getArguments()
    {
        $returnArray = [];
        foreach ($this->commandArguments as $argument) {
            $returnArray[$argument->getName()] = $argument->getValue();
        }
        return $returnArray;
    }
507802
protected function getCommandDescriptions()
    {
        $descriptions = [];
        foreach ($this->getCommands() as $command) {
            $description = '';

            $result = $this->app->createController($command);
            if ($result !== false && $result[0] instanceof Controller) {
                [$controller, $actionID] = $result;
                /** @var Controller $controller */
                $description = $controller->getHelpSummary();
            }

            $descriptions[$command] = $description;
        }

        return $descriptions;
    }