From 51c5a92ee0bb85ebc7f0c27209a4d24c84cca2a7 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Mon, 7 Oct 2024 15:55:13 -0300 Subject: [PATCH] fix: method signature After the PR https://github.com/nextcloud/server/pull/48219 the signatore of this method was changed and now is necessary to have return typing. Problem fixed: ``` Declaration of OCA\\GroupQuota\\Wrapper\\GroupQuotaWrapper::getCache($path = '', $storage = null) must be compatible with OC\\Files\\Storage\\Wrapper\\Wrapper::getCache($path = '', $storage = null): OCP\\Files\\Cache\\ICache at /var/www/html/apps-writable/groupquota/lib/Wrapper/GroupQuotaWrapper.php#35 ``` Server version affected: >= 31 Signed-off-by: Vitor Mattos --- lib/Wrapper/GroupQuotaWrapper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Wrapper/GroupQuotaWrapper.php b/lib/Wrapper/GroupQuotaWrapper.php index be0aa1e..ddb305f 100644 --- a/lib/Wrapper/GroupQuotaWrapper.php +++ b/lib/Wrapper/GroupQuotaWrapper.php @@ -22,6 +22,7 @@ namespace OCA\GroupQuota\Wrapper; use OC\Files\Storage\Wrapper\Quota; +use OCP\Files\Cache\ICache; class GroupQuotaWrapper extends Quota { /** @var int */ @@ -32,7 +33,7 @@ public function __construct($parameters) { $this->rootSize = $parameters['root_size']; } - public function getCache($path = '', $storage = null) { + public function getCache($path = '', $storage = null): ICache { $parentCache = parent::getCache($path, $storage); return new GroupUsedSpaceCacheWrapper($parentCache, $this->sizeRoot, $this->rootSize); }