setName('chill:main:address-ref-from-ban') ->addArgument('departementNo', InputArgument::REQUIRED | InputArgument::IS_ARRAY, 'a list of departement numbers') ->addOption('send-report-email', 's', InputOption::VALUE_REQUIRED, 'Email address where a list of unimported addresses can be send'); } protected function execute(InputInterface $input, OutputInterface $output): int { dump(__METHOD__); foreach ($input->getArgument('departementNo') as $departementNo) { $output->writeln('Import addresses for '.$departementNo); $this->addressReferenceFromBAN->import($departementNo, $input->hasOption('send-report-email') ? $input->getOption('send-report-email') : null); } return Command::SUCCESS; } }