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
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-01-13 14:30:27 +0300
committerCarl Schwan <carl@carlschwan.eu>2022-01-13 14:30:27 +0300
commitcbf9064b8ecde6f497146f6711fff83307a0730f (patch)
treebe8be8de69e175577532fb5e653936c1a444af4b /lib/private/Files/Storage
parent695165260f26b2f5b5584e619e54741db1a2d9cc (diff)
Fix psalm issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/private/Files/Storage')
-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 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;