diff options
author | dartcafe <github@dartcafe.de> | 2021-05-08 23:13:52 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-05-08 23:13:52 +0300 |
commit | 6d0058ca1eb0ef936b75cae2d7339887716b4bea (patch) | |
tree | bf6040c329952746cb10f2ea590291bf855afc0d /lib/Controller/SubscriptionController.php | |
parent | cdeb5c761029577544d23df6e70e6b03a5594118 (diff) |
use psalm for static analysis
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'lib/Controller/SubscriptionController.php')
-rw-r--r-- | lib/Controller/SubscriptionController.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Controller/SubscriptionController.php b/lib/Controller/SubscriptionController.php index 6496fe1b..deb640e1 100644 --- a/lib/Controller/SubscriptionController.php +++ b/lib/Controller/SubscriptionController.php @@ -49,7 +49,7 @@ class SubscriptionController extends Controller { * Get subscription status * @NoAdminRequired */ - public function get($pollId = 0): DataResponse { + public function get(int $pollId = 0): DataResponse { return $this->response(function () use ($pollId) { return ['subscribed' => $this->subscriptionService->get($pollId)]; }); @@ -59,7 +59,7 @@ class SubscriptionController extends Controller { * subscribe * @NoAdminRequired */ - public function subscribe($pollId): DataResponse { + public function subscribe(int $pollId): DataResponse { return $this->response(function () use ($pollId) { return ['subscribed' => $this->subscriptionService->set($pollId, '', true)]; }); @@ -69,7 +69,7 @@ class SubscriptionController extends Controller { * Unsubscribe * @NoAdminRequired */ - public function unsubscribe($pollId): DataResponse { + public function unsubscribe(int $pollId): DataResponse { return $this->response(function () use ($pollId) { return ['subscribed' => $this->subscriptionService->set($pollId, '', false)]; }); |