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') ->addOption('allow-remove-double-refid', 'd', InputOption::VALUE_NONE, 'Should the address importer be allowed to remove same refid in the source data, if any'); } 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, allowRemoveDoubleRefId: $input->hasOption('allow-remove-double-refid') ? $input->getOption('allow-remove-double-refid') : false); } return Command::SUCCESS; } }