diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-08-15 09:11:22 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-08-31 16:20:06 +0200 |
commit | eaef5687f9ed8dd173fbd8c4eb272462fb532141 (patch) | |
tree | 2d5a1711613de9622d35ed287428ccccfb1aa03e /lib/private/Collaboration | |
parent | 0ce0d37ac18456092702a6ed4410ec7e61bdfc07 (diff) | |
download | nextcloud-server-eaef5687f9ed8dd173fbd8c4eb272462fb532141.tar.gz nextcloud-server-eaef5687f9ed8dd173fbd8c4eb272462fb532141.zip |
Add full public interfaces
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Collaboration')
4 files changed, 8 insertions, 6 deletions
diff --git a/lib/private/Collaboration/Reference/FileReferenceProvider.php b/lib/private/Collaboration/Reference/FileReferenceProvider.php index b7c9bc9cd56..9a4bd65249f 100644 --- a/lib/private/Collaboration/Reference/FileReferenceProvider.php +++ b/lib/private/Collaboration/Reference/FileReferenceProvider.php @@ -100,7 +100,7 @@ class FileReferenceProvider implements IReferenceProvider { ]); } - public function isGloballyCachable(): bool { + public function isGloballyCacheable(): bool { return false; } diff --git a/lib/private/Collaboration/Reference/LinkReferenceProvider.php b/lib/private/Collaboration/Reference/LinkReferenceProvider.php index 51c26008b83..83bd5f954e6 100644 --- a/lib/private/Collaboration/Reference/LinkReferenceProvider.php +++ b/lib/private/Collaboration/Reference/LinkReferenceProvider.php @@ -124,7 +124,7 @@ class LinkReferenceProvider implements IReferenceProvider { } } - public function isGloballyCachable(): bool { + public function isGloballyCacheable(): bool { return true; } diff --git a/lib/private/Collaboration/Reference/Reference.php b/lib/private/Collaboration/Reference/Reference.php index 08b3847e46e..69ce7fc9597 100644 --- a/lib/private/Collaboration/Reference/Reference.php +++ b/lib/private/Collaboration/Reference/Reference.php @@ -25,7 +25,9 @@ declare(strict_types=1); namespace OC\Collaboration\Reference; -class Reference implements \OCP\Collaboration\Reference\IReference, \JsonSerializable { +use OCP\Collaboration\Reference\IReference; + +class Reference implements IReference { private string $reference; private bool $accessible = true; @@ -120,7 +122,7 @@ class Reference implements \OCP\Collaboration\Reference\IReference, \JsonSeriali ]; } - public static function toCache(Reference $reference): array { + public static function toCache(IReference $reference): array { return [ 'id' => $reference->getId(), 'title' => $reference->getTitle(), @@ -134,7 +136,7 @@ class Reference implements \OCP\Collaboration\Reference\IReference, \JsonSeriali ]; } - public static function fromCache(array $cache): Reference { + public static function fromCache(array $cache): IReference { $reference = new Reference($cache['id']); $reference->setTitle($cache['title']); $reference->setDescription($cache['description']); diff --git a/lib/private/Collaboration/Reference/ReferenceManager.php b/lib/private/Collaboration/Reference/ReferenceManager.php index 0d156cd8c71..20a5d2eb5b7 100644 --- a/lib/private/Collaboration/Reference/ReferenceManager.php +++ b/lib/private/Collaboration/Reference/ReferenceManager.php @@ -100,7 +100,7 @@ class ReferenceManager implements IReferenceManager { private function getCacheKey(IReferenceProvider $provider, string $referenceId): string { return md5($referenceId) . ( - $provider->isGloballyCachable() + $provider->isGloballyCacheable() ? '' : '-' . md5($provider->getCacheKey($referenceId)) ); |