1 | <?php |
||
8 | class MemcachedAdapter implements CacheAdapterInterface |
||
9 | { |
||
10 | /** |
||
11 | * Instance of memcached. |
||
12 | * |
||
13 | * @var \Memcached |
||
14 | */ |
||
15 | protected $instance; |
||
16 | |||
17 | /** |
||
18 | * Initialize a new localcache. |
||
19 | * |
||
20 | * @param string $filepath |
||
|
|||
21 | */ |
||
22 | 6 | public function __construct(array $config) |
|
32 | |||
33 | /** |
||
34 | * Must implement a set method. |
||
35 | * |
||
36 | * @param string $key key to set as the cache value. |
||
37 | * @param mixed $value returns the value of the cached item. |
||
38 | * @param integer $expiration when the cache should expire (unix timestamp) |
||
39 | * @return $this |
||
40 | */ |
||
41 | 4 | public function set($key, $value, $expiration = 0) |
|
47 | |||
48 | /** |
||
49 | * Must implement a get method. |
||
50 | * |
||
51 | * @param string $key Get a cached item by key. |
||
52 | * @return mixed Returns cached item or false. |
||
53 | */ |
||
54 | 4 | public function get($key) |
|
59 | |||
60 | /** |
||
61 | * Must implement a delete method. |
||
62 | * |
||
63 | * @param string $key delete a specific cached item by key. |
||
64 | * @return $this |
||
65 | */ |
||
66 | 1 | public function delete($key) |
|
71 | |||
72 | /** |
||
73 | * Clear all of the values set by this cache instance. |
||
74 | * |
||
75 | * @return $this |
||
76 | */ |
||
77 | 6 | public function clear() |
|
83 | |||
84 | /** |
||
85 | * Return the Memcached instance. |
||
86 | * |
||
87 | * @return \Memcached |
||
88 | */ |
||
89 | 1 | public function getInstance() |
|
93 | |||
94 | /** |
||
95 | * Get the value of a namespace key. |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | 6 | public function key($reset = false) |
|
111 | |||
112 | /** |
||
113 | * Given a user provided key, return a namespaced key. |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | 4 | public function createKey($key) |
|
121 | } |
||
122 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.