1 | <?php |
||
17 | class QueryRepository implements QueryRepositoryInterface |
||
18 | { |
||
19 | const ETAG_BY_URI = 'etag-by-uri'; |
||
20 | |||
21 | /** |
||
22 | * @var Cache |
||
23 | */ |
||
24 | private $kvs; |
||
25 | |||
26 | /** |
||
27 | * @var Reader |
||
28 | */ |
||
29 | private $reader; |
||
30 | |||
31 | /** |
||
32 | * @var Expiry |
||
33 | */ |
||
34 | private $expiry; |
||
35 | |||
36 | /** |
||
37 | * @var EtagSetterInterface |
||
38 | */ |
||
39 | private $setEtag; |
||
40 | |||
41 | /** |
||
42 | * @Storage("kvs") |
||
43 | */ |
||
44 | public function __construct( |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function put(ResourceObject $ro) |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function get(AbstractUri $uri) |
||
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | public function purge(AbstractUri $uri) |
||
104 | |||
105 | /** |
||
106 | * Delete etag in etag repository |
||
107 | * |
||
108 | * @param AbstractUri $uri |
||
109 | */ |
||
110 | public function deleteEtagDatabase(AbstractUri $uri) |
||
117 | |||
118 | private function evaluateBody($body) |
||
131 | |||
132 | /** |
||
133 | * @return Cacheable|null |
||
134 | */ |
||
135 | private function getCacheable(ResourceObject $ro) |
||
142 | |||
143 | /** |
||
144 | * Update etag in etag repository |
||
145 | * |
||
146 | * @param ResourceObject $ro |
||
147 | */ |
||
148 | private function updateEtagDatabase(ResourceObject $ro) |
||
161 | |||
162 | /** |
||
163 | * @param Cacheable $cacheable |
||
164 | * |
||
165 | * @return int |
||
166 | */ |
||
167 | private function getExpiryTime(Cacheable $cacheable = null) |
||
175 | } |
||
176 |
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.