setName(self::NAME) ->setDescription('Returns the detailed visits information for provided short code') ->addArgument('shortCode', InputArgument::REQUIRED, 'The short code which visits we want to get.') ->addOption('domain', 'd', InputOption::VALUE_REQUIRED, 'The domain for the short code.'); } protected function interact(InputInterface $input, OutputInterface $output): void { $shortCode = $input->getArgument('shortCode'); if (! empty($shortCode)) { return; } $io = new SymfonyStyle($input, $output); $shortCode = $io->ask('A short code was not provided. Which short code do you want to use?'); if (! empty($shortCode)) { $input->setArgument('shortCode', $shortCode); } } protected function getVisitsPaginator(InputInterface $input, DateRange $dateRange): Paginator { $identifier = ShortUrlIdentifier::fromCli($input); return $this->visitsHelper->visitsForShortUrl($identifier, new VisitsParams($dateRange)); } /** * @return array */ protected function mapExtraFields(Visit $visit): array { return []; } }