aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Connector/Sabre/FilesPlugin.php
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-05-06 00:01:08 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-05-16 11:05:54 +0200
commitf7be76125f885d66caac4a8d6697e121dce52708 (patch)
tree5abff07b0daa376ef90ad60b648611d2fc82d809 /apps/dav/lib/Connector/Sabre/FilesPlugin.php
parent829490ab7a02579c6b31573c3f53428e86cbf2e0 (diff)
downloadnextcloud-server-f7be76125f885d66caac4a8d6697e121dce52708.tar.gz
nextcloud-server-f7be76125f885d66caac4a8d6697e121dce52708.zip
Fix more psalm issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/dav/lib/Connector/Sabre/FilesPlugin.php')
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index 9474ed91f85..b784764f8fe 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -86,7 +86,7 @@ class FilesPlugin extends ServerPlugin {
public const FILE_METADATA_SIZE = '{http://nextcloud.org/ns}file-metadata-size';
/** Reference to main server object */
- private Server $server;
+ private ?Server $server = null;
private Tree $tree;
private IUserSession $userSession;
@@ -345,7 +345,7 @@ class FilesPlugin extends ServerPlugin {
$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
return json_encode($this->previewManager->isAvailable($node->getFileInfo()));
});
- $propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node): int {
+ $propFind->handle(self::SIZE_PROPERTYNAME, function () use ($node): ?int {
return $node->getSize();
});
$propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) {