getArguments() as $arguments) { if ($arguments instanceof InputArgument) { $this->getDefinition()->addArgument($arguments); } else { $this->addArgument(...$arguments); } } foreach ($this->getOptions() as $options) { if ($options instanceof InputOption) { $this->getDefinition()->addOption($options); } else { $this->addOption(...$options); } } } /** * Get the console command arguments. * * @return (InputArgument|array{ * 0: non-empty-string, * 1?: int-mask-of, * 2?: string, * 3?: mixed, * 4?: list|\Closure(CompletionInput, CompletionSuggestions): list * })[] */ protected function getArguments() { return []; } /** * Get the console command options. * * @return (InputOption|array{ * 0: non-empty-string, * 1?: string|non-empty-array, * 2?: int-mask-of, * 3?: string, * 4?: mixed, * 5?: list|\Closure(CompletionInput, CompletionSuggestions): list * })[] */ protected function getOptions() { return []; } }