From d4ba447cb08a888605b93cc1dd89daf6522de123 Mon Sep 17 00:00:00 2001 From: Pablo Ogando Ferreira Date: Fri, 8 Mar 2024 12:16:24 +0100 Subject: [PATCH] TTK-26902 PHPStan --- Command/DownloadVideosFromYouTubeChannel.php | 4 ++-- Command/ImportJobsFromYouTubeDownloadCommand.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Command/DownloadVideosFromYouTubeChannel.php b/Command/DownloadVideosFromYouTubeChannel.php index bbc8820..1baacf9 100644 --- a/Command/DownloadVideosFromYouTubeChannel.php +++ b/Command/DownloadVideosFromYouTubeChannel.php @@ -60,7 +60,7 @@ protected function configure(): void protected function execute(InputInterface $input, OutputInterface $output): int { $channel = $input->getOption('channel'); - $limit = (int) $input->getOption('limit'); + $limit = (int) $input->getOption('limit') ?? null; $this->ensureYouTubeAccountExists($input); @@ -68,7 +68,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int 'status' => ['$in' => [MultimediaObject::STATUS_PUBLISHED, MultimediaObject::STATUS_HIDDEN]], 'properties.youtube_import_status' => ['$exists' => false], 'properties.youtube_import_channel' => $channel, - ], [], $limit ?? null); + ], [], $limit); $progressBar = new ProgressBar($output, count($multimediaObjects)); $progressBar->start(); diff --git a/Command/ImportJobsFromYouTubeDownloadCommand.php b/Command/ImportJobsFromYouTubeDownloadCommand.php index 134d9b8..72421c3 100644 --- a/Command/ImportJobsFromYouTubeDownloadCommand.php +++ b/Command/ImportJobsFromYouTubeDownloadCommand.php @@ -60,7 +60,7 @@ protected function configure(): void protected function execute(InputInterface $input, OutputInterface $output): int { $channel = $input->getOption('channel'); - $limit = (int) $input->getOption('limit'); + $limit = (int) $input->getOption('limit') ?? null; $youtubeAccount = $this->ensureYouTubeAccountExists($input); @@ -68,7 +68,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int 'status' => ['$in' => [MultimediaObject::STATUS_PUBLISHED, MultimediaObject::STATUS_HIDDEN]], 'properties.youtube_import_status' => ['$exists' => true], 'properties.youtube_import_channel' => $channel, - ], [], $limit ?? null); + ], [], $limit); $progressBar = new ProgressBar($output, count($multimediaObjects)); $progressBar->start();