From 0f55921977affd84b798e06aa9eba07f833eeaf6 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Fri, 20 Feb 2026 13:49:57 +0100 Subject: [PATCH] fix: Fix typing of $mask Make sure it is available in DirMask as it is private in the parent class. Signed-off-by: Carl Schwan --- lib/Storage/DirMask.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Storage/DirMask.php b/lib/Storage/DirMask.php index 125511819..8624d3559 100644 --- a/lib/Storage/DirMask.php +++ b/lib/Storage/DirMask.php @@ -32,7 +32,13 @@ class DirMask extends PermissionsMask { private readonly int $pathLength; /** - * @param array $parameters ['storage' => $storage, 'mask' => $mask, 'path' => $path] + * @var int the permissions bits we want to keep + */ + private $mask; + + /** + * @param array{storage: \OCP\Files\Storage\IStorage, mask: int, path: string, ...} $parameters + * @psalm-suppress MoreSpecificImplementedParamType * * $storage: The storage the permissions mask should be applied on * $mask: The permission bits that should be kept, a combination of the \OCP\Constant::PERMISSION_ constants @@ -42,6 +48,7 @@ public function __construct($parameters) { parent::__construct($parameters); $this->path = rtrim((string)$parameters['path'], '/'); $this->pathLength = strlen((string)$parameters['path']); + $this->mask = $parameters['mask']; } protected function checkPath(string $path): bool {