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 Côme Chilliet
parent 0ace9a4efa
commit f46209a34e
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -100,6 +100,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->get(LoggerInterface::class);
@ -135,6 +141,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) {