diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-06-11 09:52:04 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-06-11 16:53:20 +0200 |
commit | 49d5030a532b811388c08a2340a6745255268107 (patch) | |
tree | 3a5e129b9db25e5d8f6a9ad392683ba5bd747e8f /lib/private/Notification | |
parent | 147073911fd2c4caf37c33bf4d5ae0e2727d8eba (diff) | |
download | nextcloud-server-49d5030a532b811388c08a2340a6745255268107.tar.gz nextcloud-server-49d5030a532b811388c08a2340a6745255268107.zip |
Fix userid casting in notifications
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'lib/private/Notification')
-rw-r--r-- | lib/private/Notification/Notification.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Notification/Notification.php b/lib/private/Notification/Notification.php index ef7cdb5d444..ff3826047dd 100644 --- a/lib/private/Notification/Notification.php +++ b/lib/private/Notification/Notification.php @@ -1,4 +1,5 @@ <?php +declare (strict_types = 1); /** * @copyright Copyright (c) 2016, ownCloud, Inc. * @@ -133,7 +134,7 @@ class Notification implements INotification { * @throws \InvalidArgumentException if the app id is invalid * @since 8.2.0 */ - public function setApp($app) { + public function setApp(string $app) { if (!is_string($app) || $app === '' || isset($app[32])) { throw new \InvalidArgumentException('The given app name is invalid'); } @@ -155,7 +156,7 @@ class Notification implements INotification { * @throws \InvalidArgumentException if the user id is invalid * @since 8.2.0 */ - public function setUser($user) { + public function setUser(string $user) { if (!is_string($user) || $user === '' || isset($user[64])) { throw new \InvalidArgumentException('The given user id is invalid'); } |