diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-13 14:30:27 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2022-01-14 17:17:04 +0300 |
commit | 5c155d1e53fffe93f7a8b9182521d6aeba7e5e5c (patch) | |
tree | 6360005efb3277d8ace7f0d1efe6ed1f38121272 /lib | |
parent | 79289c55f22d5c6c1a7190d4b683352c9f5faca3 (diff) |
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 ffea74dfcac..86c80e23e93 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; |