Classes/Console/Mvc/Cli/Command.php
public function getArgumentDefinitions(): array
    {
        if ($this->argumentDefinitions !== null) {
            return $this->argumentDefinitions;
        }
        if (!$this->hasArguments()) {
            return $this->argumentDefinitions = [];
        }
        $this->argumentDefinitions = [];
        $commandParameters = $this->commandReflection->getParameters();
        $commandParameterTags = $this->commandReflection->getTagsValues()['param'];
        $i = 0;
        $definedArguments = $this->getDefinedArguments();
        $definedOptions = $this->getDefinedOptions();
        foreach ($commandParameters as $commandParameterName => $commandParameterDefinition) {
            $description = '';
            if (isset($commandParameterTags[$i])) {
                $explodedAnnotation = preg_split('/\s+/', $commandParameterTags[$i], 3);
                $description = !empty($explodedAnnotation[2]) ? $explodedAnnotation[2] : '';
            }
            $dataType = $commandParameterDefinition['type'] ?? 'null';
            if ($commandParameterDefinition['array']) {
                $dataType = 'array';
            }
            $default = $commandParameterDefinition['defaultValue'] ?? null;
            $required = $commandParameterDefinition['optional'] !== true;
            $isArgument = isset($definedArguments[$commandParameterName]) || ($required && !isset($definedOptions[$commandParameterName]));
            $argumentDefinition = new CommandArgumentDefinition($commandParameterName, $required, $description, $dataType, $default, $isArgument);
            if ($isArgument) {
                $this->arguments[] = $argumentDefinition;
            } else {
                $this->options[] = $argumentDefinition;
            }
            $this->argumentDefinitions[] = $argumentDefinition;
            $i++;
        }

        return $this->argumentDefinitions;
    }
public function getArgumentDefinitions(): array
    {
        if ($this->argumentDefinitions !== null) {
            return $this->argumentDefinitions;
        }
        if (!$this->hasArguments()) {
            return $this->argumentDefinitions = [];
        }
        $this->argumentDefinitions = [];
        $commandParameters = $this->commandReflection->getParameters();
        $commandParameterTags = $this->commandReflection->getTagsValues()['param'];
        $i = 0;
        $definedArguments = $this->getDefinedArguments();
        $definedOptions = $this->getDefinedOptions();
        foreach ($commandParameters as $commandParameterName => $commandParameterDefinition) {
            $description = '';
            if (isset($commandParameterTags[$i])) {
                $explodedAnnotation = preg_split('/\s+/', $commandParameterTags[$i], 3);
                $description = !empty($explodedAnnotation[2]) ? $explodedAnnotation[2] : '';
            }
            $dataType = $commandParameterDefinition['type'] ?? 'null';
            if ($commandParameterDefinition['array']) {
                $dataType = 'array';
            }
            $default = $commandParameterDefinition['defaultValue'] ?? null;
            $required = $commandParameterDefinition['optional'] !== true;
            $isArgument = isset($definedArguments[$commandParameterName]) || ($required && !isset($definedOptions[$commandParameterName]));
            $argumentDefinition = new CommandArgumentDefinition($commandParameterName, $required, $description, $dataType, $default, $isArgument);
            if ($isArgument) {
                $this->arguments[] = $argumentDefinition;
            } else {
                $this->options[] = $argumentDefinition;
            }
            $this->argumentDefinitions[] = $argumentDefinition;
            $i++;
        }

        return $this->argumentDefinitions;
    }
Returns an array of \TYPO3\CMS\Extbase\Mvc\Cli\CommandArgumentDefinition that contains
information about required/optional arguments of this command.
If the command does not expect any arguments, an empty array is returned

@return CommandArgumentDefinition[]