fix(Wrapper): Type $storage as IStorage

Signed-off-by: provokateurin <kate@provokateurin.de>
pull/59628/head
provokateurin 4 months ago
parent 5d1e0a6e3a
commit 1b0410f333
No known key found for this signature in database
  1. 4
      lib/private/Files/Storage/Wrapper/Encoding.php
  2. 2
      lib/private/Files/Storage/Wrapper/Encryption.php
  3. 2
      lib/private/Files/Storage/Wrapper/PermissionsMask.php
  4. 4
      lib/private/Files/Storage/Wrapper/Wrapper.php

@ -23,11 +23,11 @@ class Encoding extends Wrapper {
private CappedMemoryCache $namesCache;
/**
* @param array $parameters
* @param array{storage: IStorage, ...} $parameters
*/
public function __construct(array $parameters) {
$this->storage = $parameters['storage'];
$this->namesCache = new CappedMemoryCache();
parent::__construct($parameters);
}
/**

@ -42,7 +42,7 @@ class Encryption extends Wrapper {
private bool $enabled = true;
/**
* @param array $parameters
* @param array{storage: Storage\IStorage, ...} $parameters
*/
public function __construct(
array $parameters,

@ -28,7 +28,7 @@ class PermissionsMask extends Wrapper {
protected readonly int $mask;
/**
* @param array{storage: Storage, mask: int, ...} $parameters
* @param array{storage: IStorage, mask: int, ...} $parameters
*
* $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

@ -26,7 +26,7 @@ use Override;
use Psr\Log\LoggerInterface;
class Wrapper implements Storage, ILockingStorage, IWriteStreamStorage {
protected ?Storage $storage = null;
protected ?IStorage $storage = null;
public ?ICache $cache = null;
@ -39,7 +39,7 @@ class Wrapper implements Storage, ILockingStorage, IWriteStreamStorage {
public ?IUpdater $updater = null;
/**
* @param array{storage: Storage, ...} $parameters
* @param array{storage: IStorage, ...} $parameters
*/
public function __construct(array $parameters) {
$this->storage = $parameters['storage'];

Loading…
Cancel
Save