aboutsummaryrefslogtreecommitdiff
path: root/lib/CacheInterface.php
diff options
context:
space:
mode:
authorGravatar Dag <me@dvikan.no> 2022-07-01 15:10:30 +0200
committerGravatar GitHub <noreply@github.com> 2022-07-01 15:10:30 +0200
commit4f75591060d95208a301bc6bf460d875631b29cc (patch)
tree4e37d86840e8d990a563ba75d3de6f84a53cc2de /lib/CacheInterface.php
parent66568e3a39c61546c09a47a5688914a0bdf3c60c (diff)
downloadrss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.tar.gz
rss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.tar.zst
rss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.zip
Reformat codebase v4 (#2872)
Reformat code base to PSR12 Co-authored-by: rssbridge <noreply@github.com>
Diffstat (limited to 'lib/CacheInterface.php')
-rw-r--r--lib/CacheInterface.php96
1 files changed, 49 insertions, 47 deletions
diff --git a/lib/CacheInterface.php b/lib/CacheInterface.php
index 091c5f02..67cee681 100644
--- a/lib/CacheInterface.php
+++ b/lib/CacheInterface.php
@@ -1,4 +1,5 @@
<?php
+
/**
* This file is part of RSS-Bridge, a PHP project capable of generating RSS and
* Atom feeds for websites that don't have one.
@@ -6,61 +7,62 @@
* For the full license information, please view the UNLICENSE file distributed
* with this source code.
*
- * @package Core
- * @license http://unlicense.org/ UNLICENSE
- * @link https://github.com/rss-bridge/rss-bridge
+ * @package Core
+ * @license http://unlicense.org/ UNLICENSE
+ * @link https://github.com/rss-bridge/rss-bridge
*/
/**
* The cache interface
*/
-interface CacheInterface {
- /**
- * Set scope of the current cache
- *
- * If $scope is an empty string, the cache is set to a global context.
- *
- * @param string $scope The scope the data is related to
- */
- public function setScope($scope);
+interface CacheInterface
+{
+ /**
+ * Set scope of the current cache
+ *
+ * If $scope is an empty string, the cache is set to a global context.
+ *
+ * @param string $scope The scope the data is related to
+ */
+ public function setScope($scope);
- /**
- * Set key to assign the current data
- *
- * Since $key can be anything, the cache implementation must ensure to
- * assign the related data reliably; most commonly by serializing and
- * hashing the key in an appropriate way.
- *
- * @param array $key The key the data is related to
- */
- public function setKey($key);
+ /**
+ * Set key to assign the current data
+ *
+ * Since $key can be anything, the cache implementation must ensure to
+ * assign the related data reliably; most commonly by serializing and
+ * hashing the key in an appropriate way.
+ *
+ * @param array $key The key the data is related to
+ */
+ public function setKey($key);
- /**
- * Loads data from cache
- *
- * @return mixed The cached data or null
- */
- public function loadData();
+ /**
+ * Loads data from cache
+ *
+ * @return mixed The cached data or null
+ */
+ public function loadData();
- /**
- * Stores data to the cache
- *
- * @param mixed $data The data to store
- * @return self The cache object
- */
- public function saveData($data);
+ /**
+ * Stores data to the cache
+ *
+ * @param mixed $data The data to store
+ * @return self The cache object
+ */
+ public function saveData($data);
- /**
- * Returns the timestamp for the curent cache data
- *
- * @return int Timestamp or null
- */
- public function getTime();
+ /**
+ * Returns the timestamp for the curent cache data
+ *
+ * @return int Timestamp or null
+ */
+ public function getTime();
- /**
- * Removes any data that is older than the specified age from cache
- *
- * @param int $seconds The cache age in seconds
- */
- public function purgeCache($seconds);
+ /**
+ * Removes any data that is older than the specified age from cache
+ *
+ * @param int $seconds The cache age in seconds
+ */
+ public function purgeCache($seconds);
}