diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-13 12:30:27 +0100 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-01-13 12:30:27 +0100 |
commit | cbf9064b8ecde6f497146f6711fff83307a0730f (patch) | |
tree | be8be8de69e175577532fb5e653936c1a444af4b /lib | |
parent | 695165260f26b2f5b5584e619e54741db1a2d9cc (diff) | |
download | nextcloud-server-cbf9064b8ecde6f497146f6711fff83307a0730f.tar.gz nextcloud-server-cbf9064b8ecde6f497146f6711fff83307a0730f.zip |
Fix psalm issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Wrapper.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php index b44db7c13ce..6bc66bf9c89 100644 --- a/lib/private/Files/Storage/Wrapper/Wrapper.php +++ b/lib/private/Files/Storage/Wrapper/Wrapper.php @@ -498,19 +498,19 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea } /** - * @template T of IStorage - * @param class-string<T> $class - * @return ?T + * @psalm-template T of IStorage + * @psalm-param class-string<T> $class + * @psalm-return T|null */ - public function getInstanceOfStorage(string $class): ?IStorage { + public function getInstanceOfStorage(string $class) { $storage = $this; - while ($storage->instanceOfStorage(Wrapper::class)) { + while ($storage instanceof Wrapper) { if ($storage instanceof $class) { break; } $storage = $storage->getWrapperStorage(); } - if (!is_a($storage, $class)) { + if (!($storage instanceof $class)) { return null; } return $storage; |