Skip to content

Commit 337c29f

Browse files
committed
Minor adjustments
1 parent 18c5a84 commit 337c29f

File tree

9 files changed

+10
-11
lines changed

9 files changed

+10
-11
lines changed

src/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use ByJG\Cache\Psr16\RedisCacheEngine;
1010
use ByJG\Cache\Psr16\SessionCacheEngine;
1111
use ByJG\Cache\Psr16\ShmopCacheEngine;
12-
use ByJG\Cache\Psr\CachePool;
12+
use ByJG\Cache\Psr6\CachePool;
1313

1414
class Factory
1515
{

src/Psr16/ArrayCacheEngine.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace ByJG\Cache\Psr16;
44

55
use Psr\Log\NullLogger;
6-
use Psr\SimpleCache\DateInterval;
76

87
class ArrayCacheEngine extends BaseCacheEngine
98
{
@@ -67,7 +66,7 @@ public function get($key, $default = null)
6766
*
6867
* @param string $key The key of the item to store.
6968
* @param mixed $value The value of the item to store, must be serializable.
70-
* @param null|int|DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
69+
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
7170
* the driver supports TTL then the library may set a default value
7271
* for it or let the driver take care of that.
7372
*
@@ -97,7 +96,7 @@ public function clear()
9796
* Unlock resource
9897
*
9998
* @param string $key
100-
* @return bool|void
99+
* @return bool
101100
*/
102101
public function delete($key)
103102
{

src/Psr16/BaseCacheEngine.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,7 @@ protected function addToNow($ttl)
4747
$now->add($ttl);
4848
return $now->getTimestamp();
4949
}
50+
51+
return null;
5052
}
5153
}

src/Psr16/FileSystemCacheEngine.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function get($key, $default = null)
6666
*
6767
* @param string $key The key of the item to store.
6868
* @param mixed $value The value of the item to store, must be serializable.
69-
* @param null|int|DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
69+
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
7070
* the driver supports TTL then the library may set a default value
7171
* for it or let the driver take care of that.
7272
*
@@ -177,6 +177,7 @@ public function clear()
177177
foreach ($list as $file) {
178178
unlink($file);
179179
}
180+
return true;
180181
}
181182

182183
/**

src/Psr16/MemcachedEngine.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace ByJG\Cache\Psr16;
44

5-
use ByJG\Cache\CacheEngineInterface;
65
use Memcached;
76
use Psr\Log\NullLogger;
87

src/Psr16/NoCacheEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function set($key, $value, $ttl = 0)
2828
}
2929

3030
/**
31-
* Unlock resource
3231
* @param string $key
32+
* @return bool
3333
*/
3434
public function delete($key)
3535
{

src/Psr16/RedisCacheEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function fixKey($key) {
5757
/**
5858
* @param string $key The object KEY
5959
* @param int $default IGNORED IN MEMCACHED.
60-
* @return object Description
60+
* @return mixed Description
6161
*/
6262
public function get($key, $default = null)
6363
{

src/Psr16/ShmopCacheEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ protected function isValidAge($file)
120120
*
121121
* @param string $key The key of the item to store.
122122
* @param mixed $value The value of the item to store, must be serializable.
123-
* @param null|int|DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
123+
* @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and
124124
* the driver supports TTL then the library may set a default value
125125
* for it or let the driver take care of that.
126126
* @return bool True on success and false on failure.

src/Psr6/CachePool.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33
namespace ByJG\Cache\Psr6;
44

5-
use ByJG\Cache\CacheEngineInterface;
65
use ByJG\Cache\Psr16\BaseCacheEngine;
76
use Psr\Cache\CacheItemInterface;
87
use Psr\Cache\CacheItemPoolInterface;
98
use Psr\Log\InvalidArgumentException;
10-
use Psr\SimpleCache\CacheInterface;
119

1210
class CachePool implements CacheItemPoolInterface
1311
{

0 commit comments

Comments
 (0)