From 8f762ebd424cdf4fd84746039024d0d9a928cf76 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 9 Sep 2018 00:09:11 -0400 Subject: [PATCH] Fix phpcs and phpstan errors. --- src/Cache/SimpleCacheEngine.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Cache/SimpleCacheEngine.php b/src/Cache/SimpleCacheEngine.php index 55d5d3cc3e0..e04348fb2d7 100644 --- a/src/Cache/SimpleCacheEngine.php +++ b/src/Cache/SimpleCacheEngine.php @@ -29,7 +29,7 @@ class SimpleCacheEngine implements CacheInterface /** * The wrapped cache engine object. * - * @param \Cake\Cache\CacheEngine + * @var \Cake\Cache\CacheEngine */ protected $innerEngine; @@ -48,7 +48,7 @@ public function __construct($innerEngine) * * @param string $key Key to check. * @return void - * @throws \Psr\SimpleCache\InvalidArgumentException When the key is not valid. + * @throws \Cake\Cache\InvalidArgumentException When the key is not valid. */ protected function ensureValidKey($key) { @@ -62,11 +62,11 @@ protected function ensureValidKey($key) * * @param mixed $keys The keys to check. * @return void - * @throws \Psr\SimpleCache\InvalidArgumentException When the keys are not valid. + * @throws \Cake\Cache\InvalidArgumentException When the keys are not valid. */ protected function ensureValidKeys($keys) { - if (!is_array($keys) && !($keys instanceOf \Traversable)) { + if (!is_array($keys) && !($keys instanceof \Traversable)) { throw new InvalidArgumentException('A cache key set must be either an array or a Traversable.'); } @@ -81,7 +81,7 @@ protected function ensureValidKeys($keys) * @param string $key The unique key of this item in the cache. * @param mixed $default Default value to return if the key does not exist. * @return mixed The value of the item from the cache, or $default in case of cache miss. - * @throws \Psr\SimpleCache\InvalidArgumentException If the $key string is not a legal value. + * @throws \Cake\Cache\InvalidArgumentException If the $key string is not a legal value. */ public function get($key, $default = null) { @@ -103,7 +103,7 @@ public function get($key, $default = null) * the driver supports TTL then the library may set a default value * for it or let the driver take care of that. * @return bool True on success and false on failure. - * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \Cake\Cache\InvalidArgumentException * MUST be thrown if the $key string is not a legal value. */ public function set($key, $value, $ttl = null) @@ -129,7 +129,7 @@ public function set($key, $value, $ttl = null) * * @param string $key The unique cache key of the item to delete. * @return bool True if the item was successfully removed. False if there was an error. - * @throws \Psr\SimpleCache\InvalidArgumentException If the $key string is not a legal value. + * @throws \Cake\Cache\InvalidArgumentException If the $key string is not a legal value. */ public function delete($key) { @@ -154,7 +154,7 @@ public function clear() * @param iterable $keys A list of keys that can obtained in a single operation. * @param mixed $default Default value to return for keys that do not exist. * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value. - * @throws \Psr\SimpleCache\InvalidArgumentException If $keys is neither an array nor a Traversable, + * @throws \Cake\Cache\InvalidArgumentException If $keys is neither an array nor a Traversable, * or if any of the $keys are not a legal value. */ public function getMultiple($keys, $default = null) @@ -179,7 +179,7 @@ public function getMultiple($keys, $default = null) * the driver supports TTL then the library may set a default value * for it or let the driver take care of that. * @return bool True on success and false on failure. - * @throws \Psr\SimpleCache\InvalidArgumentException If $values is neither an array nor a Traversable, + * @throws \Cake\Cache\InvalidArgumentException If $values is neither an array nor a Traversable, * or if any of the $values are not a legal value. */ public function setMultiple($values, $ttl = null) @@ -204,7 +204,7 @@ public function setMultiple($values, $ttl = null) * * @param iterable $keys A list of string-based keys to be deleted. * @return bool True if the items were successfully removed. False if there was an error. - * @throws \Psr\SimpleCache\InvalidArgumentException If $keys is neither an array nor a Traversable, + * @throws \Cake\Cache\InvalidArgumentException If $keys is neither an array nor a Traversable, * or if any of the $keys are not a legal value. */ public function deleteMultiple($keys) @@ -231,7 +231,7 @@ public function deleteMultiple($keys) * * @param string $key The cache item key. * @return bool - * @throws \Psr\SimpleCache\InvalidArgumentException If the $key string is not a legal value. + * @throws \Cake\Cache\InvalidArgumentException If the $key string is not a legal value. */ public function has($key) {