1 | <?php |
||
19 | class StashCacheAdapter implements CacheAdapterInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var Pool |
||
23 | */ |
||
24 | private $pool; |
||
25 | |||
26 | /** |
||
27 | * @param Pool $pool |
||
28 | */ |
||
29 | 45 | public function __construct(Pool $pool) |
|
33 | |||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | 9 | public function has($id) |
|
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | 9 | public function get($id) |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 9 | public function set($id, $data, $lifeTime = 0) |
|
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | 9 | public function remove($id) |
|
71 | } |
||
72 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.