/** * Get the options that are implied by annotations, e.g. @fields implies * that there should be a --fields and a --format option. * * @return InputOption[] */ public function automaticOptions(CommandInfo $commandInfo) { $automaticOptions = []; $formatManager = $this->commandProcessor()->formatterManager(); if ($formatManager) { $annotationData = $commandInfo->getAnnotations()->getArrayCopy(); $formatterOptions = new FormatterOptions($annotationData); $dataType = $commandInfo->getReturnType(); $automaticOptions = $formatManager->automaticOptions($formatterOptions, $dataType); } return $automaticOptions; }