diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index fc97ec1feb72d..cf6dc91d7c032 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -1781,12 +1781,6 @@ cache instanceof Cache]]> - - - - - - diff --git a/lib/private/Files/Cache/Wrapper/CacheWrapper.php b/lib/private/Files/Cache/Wrapper/CacheWrapper.php index f2f1036d6a398..8ffafe8684bbe 100644 --- a/lib/private/Files/Cache/Wrapper/CacheWrapper.php +++ b/lib/private/Files/Cache/Wrapper/CacheWrapper.php @@ -88,14 +88,14 @@ public function getFolderContents($folder) { } /** - * get the metadata of all files stored in $folder + * Get the metadata of all files stored in given folder * * @param int $fileId the file id of the folder - * @return array + * @return ICacheEntry[] */ public function getFolderContentsById($fileId) { $results = $this->getCache()->getFolderContentsById($fileId); - return array_map([$this, 'formatCacheEntry'], $results); + return array_filter(array_map($this->formatCacheEntry(...), $results)); } /**