]> source.dussan.org Git - nextcloud-server.git/commitdiff
chore: improve typing for SharedStorage::$storage 44323/head
authorRobin Appelman <robin@icewind.nl>
Mon, 11 Mar 2024 16:21:29 +0000 (17:21 +0100)
committerRobin Appelman <robin@icewind.nl>
Thu, 11 Jul 2024 15:39:56 +0000 (17:39 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_sharing/lib/SharedStorage.php

index 44ec877c52c10ec425083c8add99ee219ed23043..e7277323d81971b1f5e7cfaa285e0ffea28e28db 100644 (file)
@@ -97,6 +97,12 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
 
        private string $sourcePath = '';
 
+       /**
+        * @psalm-suppress NonInvariantDocblockPropertyType
+        * @var ?\OC\Files\Storage\Storage $storage
+        */
+       protected $storage;
+
        private static int $initDepth = 0;
 
        public function __construct($arguments) {
@@ -134,6 +140,9 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
                return $this->sourceRootInfo;
        }
 
+       /**
+        * @psalm-assert \OC\Files\Storage\Storage $this->storage
+        */
        private function init() {
                if ($this->initialized) {
                        if (!$this->storage) {