Skip to content

Commit

Permalink
Fix phpcs and phpstan errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 9, 2018
1 parent c16960b commit 8f762eb
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/Cache/SimpleCacheEngine.php
Expand Up @@ -29,7 +29,7 @@ class SimpleCacheEngine implements CacheInterface
/**
* The wrapped cache engine object.
*
* @param \Cake\Cache\CacheEngine
* @var \Cake\Cache\CacheEngine
*/
protected $innerEngine;

Expand All @@ -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)
{
Expand All @@ -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.');
}

Expand All @@ -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)
{
Expand All @@ -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)
Expand All @@ -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)
{
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
{
Expand Down

0 comments on commit 8f762eb

Please sign in to comment.