From e148e9b10779b95048651bfe15d014be837d6bdb Mon Sep 17 00:00:00 2001 From: grnd-alt Date: Thu, 4 Apr 2024 15:42:57 +0200 Subject: [PATCH] ignore call to getstorageinfo in psalm Signed-off-by: grnd-alt --- lib/Controller/WopiController.php | 9 ++++----- psalm.xml | 5 +++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php index 593c939122..bfca2f5cd8 100644 --- a/lib/Controller/WopiController.php +++ b/lib/Controller/WopiController.php @@ -487,17 +487,16 @@ public function putFile($fileId, // Get expected FileSize after writing $storage = \OC_Helper::getStorageInfo($path); - fseek($content,0,SEEK_END); + fseek($content, 0, SEEK_END); $finalSize = ftell($content) + $file->getSize(); - rewind( $content ); + rewind($content); try { - if ($finalSize <= $storage['free']){ + if ($finalSize <= $storage['free']) { $this->wrappedFilesystemOperation($wopi, function () use ($file, $content) { return $file->putContent($content); }); - } - else { + } else { throw new \Exception('Not enough storage'); } } catch (LockedException $e) { diff --git a/psalm.xml b/psalm.xml index df3d8e5d85..e9158fd2e7 100644 --- a/psalm.xml +++ b/psalm.xml @@ -23,6 +23,11 @@ + + + + +