summaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2021-01-11 12:57:03 +0100
committerMorris Jobke <hey@morrisjobke.de>2021-01-11 13:14:41 +0100
commit24d436cb600a725ba162a5387552a996a6fc486f (patch)
tree91e00673fad2c999776991ca57d09e8af9a10ed5 /lib/private/Files
parent8b656e321bbf358d8074ce8a3976fac5defdece0 (diff)
downloadnextcloud-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 'lib/private/Files')
-rw-r--r--lib/private/Files/FileInfo.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Encoding.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php
index 35e69ae270f..d4cc6ffe4b2 100644
--- a/lib/private/Files/FileInfo.php
+++ b/lib/private/Files/FileInfo.php
@@ -243,7 +243,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
if (\OCP\Util::isSharingDisabledForUser() || ($this->isShared() && !\OC\Share\Share::isResharingAllowed())) {
$perms = $perms & ~\OCP\Constants::PERMISSION_SHARE;
}
- return (int) $perms;
+ return $perms;
}
/**
diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php
index d49420471dd..c0587cd0263 100644
--- a/lib/private/Files/Storage/Wrapper/Encoding.php
+++ b/lib/private/Files/Storage/Wrapper/Encoding.php
@@ -61,7 +61,7 @@ class Encoding extends Wrapper {
* @return bool true if the string is all ASCII, false otherwise
*/
private function isAscii($str) {
- return (bool) !preg_match('/[\\x80-\\xff]+/', $str);
+ return !preg_match('/[\\x80-\\xff]+/', $str);
}
/**