From c953ad9bcdaf0da3fadceb29bdd1232329fe8091 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 12 Feb 2026 15:14:33 +0100 Subject: [PATCH] fix(Storage): Use correct return types for getMetaData and getDirectoryContent Signed-off-by: provokateurin --- build/rector-strict.php | 1 + lib/private/Files/Storage/Storage.php | 5 +++++ psalm-strict.xml | 1 + 3 files changed, 7 insertions(+) diff --git a/build/rector-strict.php b/build/rector-strict.php index 6490cf73d41..232630ab521 100644 --- a/build/rector-strict.php +++ b/build/rector-strict.php @@ -17,6 +17,7 @@ return (require __DIR__ . '/rector-shared.php') $nextcloudDir . '/lib/private/Settings/AuthorizedGroup.php', $nextcloudDir . '/lib/private/Settings/AuthorizedGroupMapper.php', $nextcloudDir . '/apps/settings/lib/Service/AuthorizedGroupService.php', + $nextcloudDir . '/lib/private/Files/Storage/Storage.php', ]) ->withPreparedSets( deadCode: true, diff --git a/lib/private/Files/Storage/Storage.php b/lib/private/Files/Storage/Storage.php index e2beb5a8ac9..938d676471b 100644 --- a/lib/private/Files/Storage/Storage.php +++ b/lib/private/Files/Storage/Storage.php @@ -35,6 +35,9 @@ interface Storage extends IStorage, ILockingStorage { public function getStorageCache(): \OC\Files\Cache\Storage; + /** + * @return ?array + */ public function getMetaData(string $path): ?array; /** @@ -49,6 +52,8 @@ interface Storage extends IStorage, ILockingStorage { * - etag * - storage_mtime * - permissions + * + * @return \Traversable> */ public function getDirectoryContent(string $directory): \Traversable; } diff --git a/psalm-strict.xml b/psalm-strict.xml index 13e1aae88d5..32b6550d799 100644 --- a/psalm-strict.xml +++ b/psalm-strict.xml @@ -23,6 +23,7 @@ +