From 217c2441b1bf5c9bfeffab3814f6c630a45ba244 Mon Sep 17 00:00:00 2001 From: Robin Appelman <robin@icewind.nl> Date: Wed, 8 Sep 2021 15:51:57 +0200 Subject: [PATCH] psalm fixes Signed-off-by: Robin Appelman <robin@icewind.nl> --- lib/CSPListener.php | 3 +++ lib/Migration/Install.php | 3 +++ lib/Queue/IQueue.php | 5 +++++ lib/Queue/RedisQueue.php | 3 --- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/CSPListener.php b/lib/CSPListener.php index 3721989..d6b57c0 100644 --- a/lib/CSPListener.php +++ b/lib/CSPListener.php @@ -30,6 +30,9 @@ use OCP\IConfig; use OCP\Security\CSP\AddContentSecurityPolicyEvent; use Psr\Log\LoggerInterface; +/** + * @implements IEventListener<AddContentSecurityPolicyEvent> + */ class CSPListener implements IEventListener { private $config; private $logger; diff --git a/lib/Migration/Install.php b/lib/Migration/Install.php index 2c94063..44e9bd1 100644 --- a/lib/Migration/Install.php +++ b/lib/Migration/Install.php @@ -38,6 +38,9 @@ class Install implements IRepairStep { return 'Set binary permissions'; } + /** + * @return void + */ public function run(IOutput $output) { $this->setupWizard->testBinary(); } diff --git a/lib/Queue/IQueue.php b/lib/Queue/IQueue.php index ac14b51..8a0f35d 100644 --- a/lib/Queue/IQueue.php +++ b/lib/Queue/IQueue.php @@ -24,5 +24,10 @@ declare(strict_types=1); namespace OCA\NotifyPush\Queue; interface IQueue { + /** + * @param string $channel + * @param mixed $message + * @return void + */ public function push(string $channel, $message); } diff --git a/lib/Queue/RedisQueue.php b/lib/Queue/RedisQueue.php index 52b73ff..de9446e 100644 --- a/lib/Queue/RedisQueue.php +++ b/lib/Queue/RedisQueue.php @@ -33,9 +33,6 @@ class RedisQueue implements IQueue { $this->redis = $redis; } - /** - * @return void - */ public function push(string $channel, $message) { $this->redis->publish($channel, json_encode($message)); } -- GitLab