1 | <?php |
||
12 | final class SimpleCacheAdapter implements PsrCache |
||
13 | { |
||
14 | /** |
||
15 | * @var DoctrineCache|ClearableCache|MultiGetCache|MultiPutCache |
||
16 | */ |
||
17 | private $doctrineCache; |
||
18 | |||
19 | /** |
||
20 | * @param DoctrineCache $doctrineCache |
||
21 | * @throws \Roave\DoctrineSimpleCache\CacheException |
||
22 | */ |
||
23 | 12 | public function __construct(DoctrineCache $doctrineCache) |
|
37 | |||
38 | /** |
||
39 | * {@inheritDoc} |
||
40 | */ |
||
41 | 1 | public function get($key, $default = null) |
|
45 | |||
46 | /** |
||
47 | * {@inheritDoc} |
||
48 | */ |
||
49 | 1 | public function set($key, $value, $ttl = null) : bool |
|
53 | |||
54 | /** |
||
55 | * {@inheritDoc} |
||
56 | */ |
||
57 | 3 | public function delete($key) : bool |
|
61 | |||
62 | /** |
||
63 | * {@inheritDoc} |
||
64 | */ |
||
65 | 1 | public function clear() : bool |
|
69 | |||
70 | /** |
||
71 | * {@inheritDoc} |
||
72 | */ |
||
73 | 1 | public function getMultiple($keys, $default = null) |
|
77 | |||
78 | /** |
||
79 | * {@inheritDoc} |
||
80 | */ |
||
81 | 1 | public function setMultiple($values, $ttl = null) : bool |
|
85 | |||
86 | /** |
||
87 | * {@inheritDoc} |
||
88 | */ |
||
89 | 2 | public function deleteMultiple($keys) : bool |
|
101 | |||
102 | /** |
||
103 | * {@inheritDoc} |
||
104 | */ |
||
105 | 1 | public function has($key) : bool |
|
109 | } |
||
110 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: