Skip to content

Commit

Permalink
fix: method signature
Browse files Browse the repository at this point in the history
After the PR nextcloud/server#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 <[email protected]>
  • Loading branch information
vitormattos committed Oct 7, 2024
1 parent cca9a0d commit 51c5a92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Wrapper/GroupQuotaWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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);
}
Expand Down

0 comments on commit 51c5a92

Please sign in to comment.