Skip to content

Commit ec759ce

Browse files
icewind1991backportbot[bot]
authored andcommitted
code checker fixes for instanceOfStorage
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 303f05f commit ec759ce

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

apps/files_sharing/lib/ISharedStorage.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@
2424

2525
namespace OCA\Files_Sharing;
2626

27-
interface ISharedStorage {
27+
use OCP\Files\Storage\IStorage;
28+
29+
interface ISharedStorage extends IStorage {
2830
}

lib/public/Files/IHomeStorage.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@
3232

3333
namespace OCP\Files;
3434

35+
use OCP\Files\Storage\IStorage;
36+
3537
/**
3638
* Interface IHomeStorage
3739
*
3840
* @since 7.0.0
3941
*/
40-
interface IHomeStorage {
42+
interface IHomeStorage extends IStorage {
4143
}

lib/public/Files/Storage/IDisableEncryptionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
*
3030
* @since 16.0.0
3131
*/
32-
interface IDisableEncryptionStorage {
32+
interface IDisableEncryptionStorage extends IStorage {
3333
}

lib/public/Files/Storage/IStorage.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,12 @@ public function isLocal();
362362
/**
363363
* Check if the storage is an instance of $class or is a wrapper for a storage that is an instance of $class
364364
*
365+
* @template T of IStorage
365366
* @param string $class
367+
* @psalm-param class-string<T> $class
366368
* @return bool
367369
* @since 9.0.0
370+
* @psalm-assert-if-true T $this
368371
*/
369372
public function instanceOfStorage($class);
370373

0 commit comments

Comments
 (0)