| 1 | <?php |
||
| 13 | class CacheClient extends Client |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var CacheStorage |
||
| 17 | */ |
||
| 18 | private $storage; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * CacheClient constructor. |
||
| 22 | * @param array $config |
||
| 23 | */ |
||
| 24 | public function __construct($config = []) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $dir |
||
| 36 | * @param int $ttl |
||
| 37 | */ |
||
| 38 | private function attachCacheSubscriber($dir, $ttl = 0) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Clear all cache |
||
| 47 | */ |
||
| 48 | public function cacheClear() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Delete cache by request |
||
| 59 | * @param RequestInterface $request |
||
| 60 | */ |
||
| 61 | public function deleteCache(RequestInterface $request) |
||
| 65 | } |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.