Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-01-13 14:30:27 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2022-01-14 17:17:04 +0300
commit5c155d1e53fffe93f7a8b9182521d6aeba7e5e5c (patch)
tree6360005efb3277d8ace7f0d1efe6ed1f38121272 /lib
parent79289c55f22d5c6c1a7190d4b683352c9f5faca3 (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.php12
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;