Total Complexity | 6 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class Cache |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var FilesystemAdapter |
||
17 | */ |
||
18 | private $cache; |
||
19 | |||
20 | public function __construct($cacheDirectory = null) |
||
21 | { |
||
22 | if (!$cacheDirectory) { |
||
23 | $cacheDirectory = __DIR__ . '/../../../../var/cache/app'; |
||
24 | } |
||
25 | |||
26 | $this->cache = new FilesystemCache( |
||
|
|||
27 | 'depmon', |
||
28 | 0, |
||
29 | $cacheDirectory |
||
30 | ); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * |
||
35 | */ |
||
36 | public function get($key) |
||
37 | { |
||
38 | try { |
||
39 | return $this->cache->get($key); |
||
40 | } catch (\Psr\SimpleCache\InvalidArgumentException $e) { |
||
41 | } |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * |
||
46 | */ |
||
47 | public function set($key, $value): bool |
||
52 | } |
||
53 | } |
||
54 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..