The expression return apcu_exists($key) could return the type string[] which is incompatible with the type-hinted return boolean. Consider adding an additional type-check to rule them out.
Loading history...
22
}
23
24
/**
25
* @param string $key
26
* @return mixed
27
*/
28
public function read(string $key)
29
{
30
return apcu_fetch($key);
31
}
32
33
/**
34
* @param string $key
35
* @param mixed $data
36
* @param int $ttl
37
* @return bool
38
*/
39
public function write(string $key, $data, int $ttl = null) : bool
The expression return apcu_store($key, $data, $ttl ?? 0) could return the type array which is incompatible with the type-hinted return boolean. Consider adding an additional type-check to rule them out.
The expression return apcu_delete($key) could return the type string[] which is incompatible with the type-hinted return boolean. Consider adding an additional type-check to rule them out.