Skip to content

Commit

Permalink
Minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
byjg committed May 27, 2017
1 parent 18c5a84 commit 337c29f
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use ByJG\Cache\Psr16\RedisCacheEngine;
use ByJG\Cache\Psr16\SessionCacheEngine;
use ByJG\Cache\Psr16\ShmopCacheEngine;
use ByJG\Cache\Psr\CachePool;
use ByJG\Cache\Psr6\CachePool;

class Factory
{
Expand Down
5 changes: 2 additions & 3 deletions src/Psr16/ArrayCacheEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace ByJG\Cache\Psr16;

use Psr\Log\NullLogger;
use Psr\SimpleCache\DateInterval;

class ArrayCacheEngine extends BaseCacheEngine
{
Expand Down Expand Up @@ -67,7 +66,7 @@ public function get($key, $default = null)
*
* @param string $key The key of the item to store.
* @param mixed $value The value of the item to store, must be serializable.
* @param null|int|DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
* the driver supports TTL then the library may set a default value
* for it or let the driver take care of that.
*
Expand Down Expand Up @@ -97,7 +96,7 @@ public function clear()
* Unlock resource
*
* @param string $key
* @return bool|void
* @return bool
*/
public function delete($key)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Psr16/BaseCacheEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@ protected function addToNow($ttl)
$now->add($ttl);
return $now->getTimestamp();
}

return null;
}
}
3 changes: 2 additions & 1 deletion src/Psr16/FileSystemCacheEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function get($key, $default = null)
*
* @param string $key The key of the item to store.
* @param mixed $value The value of the item to store, must be serializable.
* @param null|int|DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
* the driver supports TTL then the library may set a default value
* for it or let the driver take care of that.
*
Expand Down Expand Up @@ -177,6 +177,7 @@ public function clear()
foreach ($list as $file) {
unlink($file);
}
return true;
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/Psr16/MemcachedEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace ByJG\Cache\Psr16;

use ByJG\Cache\CacheEngineInterface;
use Memcached;
use Psr\Log\NullLogger;

Expand Down
2 changes: 1 addition & 1 deletion src/Psr16/NoCacheEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public function set($key, $value, $ttl = 0)
}

/**
* Unlock resource
* @param string $key
* @return bool
*/
public function delete($key)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Psr16/RedisCacheEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function fixKey($key) {
/**
* @param string $key The object KEY
* @param int $default IGNORED IN MEMCACHED.
* @return object Description
* @return mixed Description
*/
public function get($key, $default = null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Psr16/ShmopCacheEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected function isValidAge($file)
*
* @param string $key The key of the item to store.
* @param mixed $value The value of the item to store, must be serializable.
* @param null|int|DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
* 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.
Expand Down
2 changes: 0 additions & 2 deletions src/Psr6/CachePool.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

namespace ByJG\Cache\Psr6;

use ByJG\Cache\CacheEngineInterface;
use ByJG\Cache\Psr16\BaseCacheEngine;
use Psr\Cache\CacheItemInterface;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Log\InvalidArgumentException;
use Psr\SimpleCache\CacheInterface;

class CachePool implements CacheItemPoolInterface
{
Expand Down

0 comments on commit 337c29f

Please sign in to comment.