summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-01-17 06:51:04 +0100
committerGitHub <noreply@github.com>2018-01-17 06:51:04 +0100
commitd1420ef4812fc3f3822adf1b1ba91b9a6fb8fa80 (patch)
tree0e02d36a2d264d639265a4bf851a9f87311f2c86 /lib/public
parent0b464e527489488ed058cc80f6bb93e086eec681 (diff)
parentc5fcfb070991c94631a89480f66c97a1d18721d0 (diff)
downloadnextcloud-server-d1420ef4812fc3f3822adf1b1ba91b9a6fb8fa80.tar.gz
nextcloud-server-d1420ef4812fc3f3822adf1b1ba91b9a6fb8fa80.zip
Merge pull request #7901 from nextcloud/strict_cache_factory
Made the cache factory strict
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/ICacheFactory.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/public/ICacheFactory.php b/lib/public/ICacheFactory.php
index cc4d8fa3ec3..76145fe1f78 100644
--- a/lib/public/ICacheFactory.php
+++ b/lib/public/ICacheFactory.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -36,11 +37,11 @@ interface ICacheFactory{
* All entries added trough the cache instance will be namespaced by $prefix to prevent collisions between apps
*
* @param string $prefix
- * @return \OCP\ICache
+ * @return ICache
* @since 7.0.0
* @deprecated 13.0.0 Use either createLocking, createDistributed or createLocal
*/
- public function create($prefix = '');
+ public function create(string $prefix = ''): ICache;
/**
* Check if any memory cache backend is available
@@ -48,32 +49,32 @@ interface ICacheFactory{
* @return bool
* @since 7.0.0
*/
- public function isAvailable();
+ public function isAvailable(): bool;
/**
* create a cache instance for storing locks
*
* @param string $prefix
- * @return \OCP\IMemcache
+ * @return IMemcache
* @since 13.0.0
*/
- public function createLocking($prefix = '');
+ public function createLocking(string $prefix = ''): IMemcache;
/**
* create a distributed cache instance
*
* @param string $prefix
- * @return \OCP\ICache
+ * @return ICache
* @since 13.0.0
*/
- public function createDistributed($prefix = '');
+ public function createDistributed(string $prefix = ''): ICache;
/**
* create a local cache instance
*
* @param string $prefix
- * @return \OCP\ICache
+ * @return ICache
* @since 13.0.0
*/
- public function createLocal($prefix = '');
+ public function createLocal(string $prefix = ''): ICache;
}