From dcf91c3586d202e5580753910244dcbbe112c93e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 11 Dec 2023 07:12:55 +0100 Subject: [PATCH] fix(CI): Make psalm more happy about not returning null Signed-off-by: Joas Schilling --- lib/Share/Helper/FilesMetadataCache.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Share/Helper/FilesMetadataCache.php b/lib/Share/Helper/FilesMetadataCache.php index 587d2a7066c..e7612bab66e 100644 --- a/lib/Share/Helper/FilesMetadataCache.php +++ b/lib/Share/Helper/FilesMetadataCache.php @@ -70,11 +70,12 @@ public function getMetadataPhotosSizeForFileId(int $fileId): array { } } - if ($this->filesSizeData[$fileId] === null) { + $data = $this->filesSizeData[$fileId]; + if ($data === null) { throw new FilesMetadataNotFoundException(); } - return $this->filesSizeData[$fileId]; + return $data; } protected function cachePhotosSize(int $fileId, IFilesMetadata $metadata): void {