1 | <?php |
||
13 | final class DefaultCache extends CacheProvider |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | public const CACHE_NS = 'Doctrine'; |
||
19 | |||
20 | /** |
||
21 | * @var bool |
||
22 | */ |
||
23 | private $debugMode = FALSE; |
||
24 | |||
25 | /** |
||
26 | * @var Cache |
||
27 | */ |
||
28 | private $cache; |
||
29 | |||
30 | public function __construct(IStorage $storage, string $namespace = self::CACHE_NS, bool $debugMode = FALSE) |
||
31 | { |
||
32 | $this->cache = new Cache($storage, $namespace); |
||
33 | $this->debugMode = $debugMode; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | protected function doFetch($id) |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | protected function doContains($id) |
||
52 | |||
53 | /** |
||
54 | * @param string $id |
||
55 | * @param string|object $data |
||
56 | * @param int $lifeTime |
||
57 | * @return bool |
||
58 | */ |
||
59 | protected function doSave($id, $data, $lifeTime = 0) |
||
82 | |||
83 | /** |
||
84 | * @param string $id |
||
85 | * @param mixed $data |
||
86 | * @param int $lifeTime |
||
87 | * @return bool |
||
88 | */ |
||
89 | protected function doSaveDependingOnFiles($id, $data, array $files, $lifeTime = 0) |
||
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | protected function doDelete($id) |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | protected function doFlush() |
||
125 | |||
126 | /** |
||
127 | * {@inheritdoc} |
||
128 | */ |
||
129 | protected function doGetStats() |
||
139 | |||
140 | private static function getClassFilename(string $className): string |
||
145 | } |
||
146 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.