]> source.dussan.org Git - nextcloud-server.git/commitdiff
code checker fixes for instanceOfStorage
authorRobin Appelman <robin@icewind.nl>
Wed, 17 Nov 2021 15:42:29 +0000 (16:42 +0100)
committerLouis (Rebase PR Action) <artonge@users.noreply.github.com>
Thu, 2 Dec 2021 20:00:45 +0000 (20:00 +0000)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_sharing/lib/ISharedStorage.php
lib/public/Files/IHomeStorage.php
lib/public/Files/Storage/IDisableEncryptionStorage.php
lib/public/Files/Storage/IStorage.php

index 07c012fd6ff9483076a11568c5b3002f9baf8ef2..cbed54b3a45eaca9101d893aa5aea6e479ff1267 100644 (file)
@@ -24,5 +24,7 @@
 
 namespace OCA\Files_Sharing;
 
-interface ISharedStorage {
+use OCP\Files\Storage\IStorage;
+
+interface ISharedStorage extends IStorage {
 }
index 074e7a093012f6ce03a7ce9094cba5da2e955d42..96aefd17f01f7d25bd3f2557171ccc9e3088a379 100644 (file)
 
 namespace OCP\Files;
 
+use OCP\Files\Storage\IStorage;
+
 /**
  * Interface IHomeStorage
  *
  * @since 7.0.0
  */
-interface IHomeStorage {
+interface IHomeStorage extends IStorage {
 }
index 761f636b06881b900e1df4d9f2ea3a0c30daf7c3..e070244094d9fa88f6c260c77d1bda17dba9ff12 100644 (file)
@@ -29,5 +29,5 @@ namespace OCP\Files\Storage;
  *
  * @since 16.0.0
  */
-interface IDisableEncryptionStorage {
+interface IDisableEncryptionStorage extends IStorage {
 }
index 5e70e319c40b91621b36a5ac27dc184b09277a6b..96bc7ea616db4b69f3143dfcf3ae089d1f35fb51 100644 (file)
@@ -362,9 +362,12 @@ interface IStorage {
        /**
         * Check if the storage is an instance of $class or is a wrapper for a storage that is an instance of $class
         *
+        * @template T of IStorage
         * @param string $class
+        * @psalm-param class-string<T> $class
         * @return bool
         * @since 9.0.0
+        * @psalm-assert-if-true T $this
         */
        public function instanceOfStorage($class);