diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2021-01-08 23:26:10 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-01-12 13:29:08 +0100 |
commit | 67b6c4e1b0a9fa0138eb897f8a19e5b85d705c29 (patch) | |
tree | e1eeaea2f2e9bd41a9ca9437109f0fe2f3306295 /lib/Command/Updater | |
parent | e5d56f2c2e4542fca98194620a30605aa9e14437 (diff) |
Fix psalm issues
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'lib/Command/Updater')
-rw-r--r-- | lib/Command/Updater/AfterUpdate.php | 5 | ||||
-rw-r--r-- | lib/Command/Updater/AllFeeds.php | 3 | ||||
-rw-r--r-- | lib/Command/Updater/BeforeUpdate.php | 3 | ||||
-rw-r--r-- | lib/Command/Updater/UpdateFeed.php | 5 |
4 files changed, 14 insertions, 2 deletions
diff --git a/lib/Command/Updater/AfterUpdate.php b/lib/Command/Updater/AfterUpdate.php index 62ceb2710..bedc8c9ff 100644 --- a/lib/Command/Updater/AfterUpdate.php +++ b/lib/Command/Updater/AfterUpdate.php @@ -35,6 +35,9 @@ class AfterUpdate extends Command $this->itemService = $itemService; } + /** + * @return void + */ protected function configure() { $this->setName('news:updater:after-update') @@ -44,7 +47,7 @@ class AfterUpdate extends Command protected function execute(InputInterface $input, OutputInterface $output): int { - $count = $input->getArgument('purge_count'); + $count = (int) $input->getArgument('purge_count'); $output->writeln($this->itemService->purgeOverThreshold($count)); diff --git a/lib/Command/Updater/AllFeeds.php b/lib/Command/Updater/AllFeeds.php index 942b5706d..384508d7d 100644 --- a/lib/Command/Updater/AllFeeds.php +++ b/lib/Command/Updater/AllFeeds.php @@ -40,6 +40,9 @@ class AllFeeds extends Command $this->feedService = $feedService; } + /** + * @return void + */ protected function configure() { $json = '{"feeds": [{"id": 39, "userId": "john"}, // etc ]}'; diff --git a/lib/Command/Updater/BeforeUpdate.php b/lib/Command/Updater/BeforeUpdate.php index 787125c32..605a2c9ee 100644 --- a/lib/Command/Updater/BeforeUpdate.php +++ b/lib/Command/Updater/BeforeUpdate.php @@ -29,6 +29,9 @@ class BeforeUpdate extends Command $this->updaterService = $updater; } + /** + * @return void + */ protected function configure() { $this->setName('news:updater:before-update') diff --git a/lib/Command/Updater/UpdateFeed.php b/lib/Command/Updater/UpdateFeed.php index 4ffb8f57a..401ae7199 100644 --- a/lib/Command/Updater/UpdateFeed.php +++ b/lib/Command/Updater/UpdateFeed.php @@ -30,6 +30,9 @@ class UpdateFeed extends Command $this->feedService = $feedService; } + /** + * @return void + */ protected function configure() { $this->setName('news:updater:update-feed') @@ -48,8 +51,8 @@ class UpdateFeed extends Command protected function execute(InputInterface $input, OutputInterface $output): int { - $feedId = $input->getArgument('feed-id'); $userId = $input->getArgument('user-id'); + $feedId = (int) $input->getArgument('feed-id'); try { $feed = $this->feedService->find($userId, $feedId); $updated_feed = $this->feedService->fetch($feed); |