Skip to content

Commit ef57cad

Browse files
committed
Make us independent from PHPCache
1 parent 7d6c92d commit ef57cad

4 files changed

Lines changed: 28 additions & 13 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
/*
4+
* This file is part of php-cache organization.
5+
*
6+
* (c) 2015 Aaron Scherer <aequasi@gmail.com>, Tobias Nyholm <tobias.nyholm@gmail.com>
7+
*
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
10+
*/
11+
12+
namespace Cache\Taggable\Exception;
13+
14+
class InvalidArgumentException extends \InvalidArgumentException implements \Psr\SimpleCache\InvalidArgumentException
15+
{
16+
}

TaggablePSR6ItemAdapter.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Cache\Taggable;
1313

14-
use Cache\Adapter\Common\Exception\InvalidArgumentException;
14+
use Cache\Taggable\Exception\InvalidArgumentException;
1515
use Cache\TagInterop\TaggableCacheItemInterface;
1616
use Psr\Cache\CacheItemInterface;
1717

@@ -22,29 +22,29 @@
2222
* adapter.
2323
*
2424
* This adapter stores tags along with the cached value, by storing wrapping
25-
* the item in an array structure containing both.
25+
* the item in an array structure containing both
2626
*
2727
* @author Magnus Nordlander <magnus@fervo.se>
2828
*/
2929
class TaggablePSR6ItemAdapter implements TaggableCacheItemInterface
3030
{
3131
/**
32-
* @type bool
32+
* @var bool
3333
*/
3434
private $initialized = false;
3535

3636
/**
37-
* @type CacheItemInterface
37+
* @var CacheItemInterface
3838
*/
3939
private $cacheItem;
4040

4141
/**
42-
* @type array<string>
42+
* @var array<string>
4343
*/
4444
private $prevTags = [];
4545

4646
/**
47-
* @type array<string>
47+
* @var array<string>
4848
*/
4949
private $tags = [];
5050

@@ -115,7 +115,7 @@ public function set($value)
115115

116116
$this->cacheItem->set([
117117
'value' => $value,
118-
'tags' => $this->tags,
118+
'tags' => $this->tags,
119119
]);
120120

121121
return $this;
@@ -202,7 +202,7 @@ private function updateTags()
202202
{
203203
$this->cacheItem->set([
204204
'value' => $this->get(),
205-
'tags' => $this->tags,
205+
'tags' => $this->tags,
206206
]);
207207
}
208208

TaggablePSR6PoolAdapter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
class TaggablePSR6PoolAdapter implements TaggableCacheItemPoolInterface
4141
{
4242
/**
43-
* @type CacheItemPoolInterface
43+
* @var CacheItemPoolInterface
4444
*/
4545
private $cachePool;
4646

4747
/**
48-
* @type CacheItemPoolInterface
48+
* @var CacheItemPoolInterface
4949
*/
5050
private $tagStorePool;
5151

@@ -64,8 +64,8 @@ private function __construct(CacheItemPoolInterface $cachePool, CacheItemPoolInt
6464
}
6565

6666
/**
67-
* @param CacheItemPoolInterface $cachePool The pool to which to add tagging capabilities.
68-
* @param CacheItemPoolInterface|null $tagStorePool The pool to store tags in. If null is passed, the main pool is used.
67+
* @param CacheItemPoolInterface $cachePool The pool to which to add tagging capabilities
68+
* @param CacheItemPoolInterface|null $tagStorePool The pool to store tags in. If null is passed, the main pool is used
6969
*
7070
* @return TaggableCacheItemPoolInterface
7171
*/

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"require": {
3333
"php": "^5.6 || ^7.0",
3434
"psr/cache": "^1.0",
35-
"cache/adapter-common": "^1.0",
3635
"cache/tag-interop": "^1.0"
3736
},
3837
"require-dev": {

0 commit comments

Comments
 (0)