setName(self::NAME) ->setDescription('Returns the detailed visits information for provided short code'); $this->shortUrlIdentifierInput = new ShortUrlIdentifierInput( $this, shortCodeDesc: 'The short code which visits we want to get.', domainDesc: 'The domain for the short code.', ); } protected function interact(InputInterface $input, OutputInterface $output): void { $shortCode = $this->shortUrlIdentifierInput->shortCode($input); 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); } } /** * @return Paginator */ protected function getVisitsPaginator(InputInterface $input, DateRange $dateRange): Paginator { $identifier = $this->shortUrlIdentifierInput->toShortUrlIdentifier($input); return $this->visitsHelper->visitsForShortUrl($identifier, new VisitsParams($dateRange)); } /** * @return array */ protected function mapExtraFields(Visit $visit): array { return []; } }