chore: improve typing for SharedStorage::$storage

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2024-03-11 17:21:29 +01:00 committed by backportbot[bot]
parent 459c17492b
commit 7982645f66

View file

@ -101,6 +101,12 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
private static int $initDepth = 0;
/**
* @psalm-suppress NonInvariantDocblockPropertyType
* @var ?\OC\Files\Storage\Storage $storage
*/
protected $storage;
public function __construct($arguments) {
$this->ownerView = $arguments['ownerView'];
$this->logger = \OC::$server->getLogger();
@ -136,6 +142,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) {