isInteractive(); if (! $force && ! $dryRun) { $io->warning([ 'Careful!', 'You are about to perform a destructive operation that can result in deleted short URLs and visits.', 'This action cannot be undone. Proceed at your own risk', ]); if (! $io->confirm('Continue?', default: false)) { return self::INVALID; } } if ($dryRun) { $result = $this->deleteShortUrlService->countExpiredShortUrls($conditions); $io->success(sprintf('There are %s expired short URLs matching provided conditions', $result)); return self::SUCCESS; } $result = $this->deleteShortUrlService->deleteExpiredShortUrls($conditions); $io->success(sprintf('%s expired short URLs have been deleted', $result)); return self::SUCCESS; } }