protected function getCountriesFromInput(InputInterface $input) { $countries = $input->getOption('country'); if (!is_array($countries) || empty($countries)) { throw new InvalidArgumentException('You need to specify minimum a Country. eg: --country=FR'); } return $countries; }