writeln(''); foreach ($messages as $message) { $output->writeln('' . $message . ''); } $output->writeln(''); } protected function checkAllRequiredOptionsAreNotEmpty(InputInterface $input) { $options = $this->getDefinition()->getOptions(); foreach ($options as $option) { $name = $option->getName(); $value = $input->getOption($name); if ($option->isValueRequired() && empty($value)) { throw new \InvalidArgumentException(sprintf('The required option --%s is not set', $name)); } } } }