diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-01-11 12:57:03 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2021-01-11 13:14:41 +0100 |
commit | 24d436cb600a725ba162a5387552a996a6fc486f (patch) | |
tree | 91e00673fad2c999776991ca57d09e8af9a10ed5 /apps/files_sharing/lib | |
parent | 8b656e321bbf358d8074ce8a3976fac5defdece0 (diff) | |
download | nextcloud-server-24d436cb600a725ba162a5387552a996a6fc486f.tar.gz nextcloud-server-24d436cb600a725ba162a5387552a996a6fc486f.zip |
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 3 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareesAPIController.php | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index c8b4e857520..12408d8e108 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -1064,7 +1064,7 @@ class ShareAPIController extends OCSController { } if ($permissions !== null) { - $newPermissions = (int) $permissions; + $newPermissions = $permissions; $newPermissions = $newPermissions & ~Constants::PERMISSION_SHARE; } @@ -1147,7 +1147,6 @@ class ShareAPIController extends OCSController { // NOT A LINK SHARE else { if ($permissions !== null) { - $permissions = (int) $permissions; $share->setPermissions($permissions); } diff --git a/apps/files_sharing/lib/Controller/ShareesAPIController.php b/apps/files_sharing/lib/Controller/ShareesAPIController.php index c857df85229..33ac1662a4d 100644 --- a/apps/files_sharing/lib/Controller/ShareesAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareesAPIController.php @@ -212,7 +212,7 @@ class ShareesAPIController extends OCSController { } sort($shareTypes); - $this->limit = (int) $perPage; + $this->limit = $perPage; $this->offset = $perPage * ($page - 1); // In global scale mode we always search the loogup server |