diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-01-23 09:55:03 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-02-07 11:23:29 +0100 |
commit | d9dbed91050e80ab15768c278a1aecdfc3a1efda (patch) | |
tree | 6b29c1164d64e22f06c426175d0195f1d412a4f0 /lib/private/Files/Storage/Wrapper | |
parent | ff776a90b133fa113c29511a5a7983a7a1a8b73c (diff) | |
download | nextcloud-server-d9dbed91050e80ab15768c278a1aecdfc3a1efda.tar.gz nextcloud-server-d9dbed91050e80ab15768c278a1aecdfc3a1efda.zip |
Fix psalm errors related to filesizes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Files/Storage/Wrapper')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Availability.php | 3 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encryption.php | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Availability.php b/lib/private/Files/Storage/Wrapper/Availability.php index 2d3d33ff024..661bf636711 100644 --- a/lib/private/Files/Storage/Wrapper/Availability.php +++ b/lib/private/Files/Storage/Wrapper/Availability.php @@ -451,6 +451,9 @@ class Availability extends Wrapper { } /** + * @template T of StorageNotAvailableException|null + * @param T $e + * @psalm-return (T is null ? void : never) * @throws StorageNotAvailableException */ protected function setUnavailable(?StorageNotAvailableException $e): void { diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index 7c453e95092..f66661a615f 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -134,7 +134,7 @@ class Encryption extends Wrapper { * see https://www.php.net/manual/en/function.filesize.php * The result for filesize when called on a folder is required to be 0 */ - public function filesize(string $path): int|float { + public function filesize(string $path): false|int|float { $fullPath = $this->getFullPath($path); /** @var CacheEntry $info */ |