1 | <?php |
||
13 | final class BrowscapCache implements BrowscapCacheInterface |
||
14 | { |
||
15 | /** |
||
16 | * Path to the cache directory |
||
17 | * |
||
18 | * @var \Psr\SimpleCache\CacheInterface |
||
19 | */ |
||
20 | private $cache; |
||
21 | |||
22 | /** |
||
23 | * @var \Psr\Log\LoggerInterface |
||
24 | */ |
||
25 | private $logger; |
||
26 | |||
27 | /** |
||
28 | * Detected browscap version (read from INI file) |
||
29 | * |
||
30 | * @var int |
||
31 | */ |
||
32 | private $version; |
||
33 | |||
34 | /** |
||
35 | * Release date of the Browscap data (read from INI file) |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | private $releaseDate; |
||
40 | |||
41 | /** |
||
42 | * Type of the Browscap data (read from INI file) |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | private $type; |
||
47 | |||
48 | /** |
||
49 | * Constructor class, checks for the existence of (and loads) the cache and |
||
50 | * if needed updated the definitions |
||
51 | * |
||
52 | * @param \Psr\SimpleCache\CacheInterface $adapter |
||
53 | * @param LoggerInterface $logger |
||
54 | */ |
||
55 | 4 | public function __construct(CacheInterface $adapter, LoggerInterface $logger) |
|
60 | |||
61 | /** |
||
62 | * Gets the version of the Browscap data |
||
63 | * |
||
64 | * @return int |
||
65 | */ |
||
66 | 2 | public function getVersion() : ?int |
|
85 | |||
86 | /** |
||
87 | * Gets the release date of the Browscap data |
||
88 | * |
||
89 | * @return string|null |
||
90 | */ |
||
91 | 1 | public function getReleaseDate() : ?string |
|
110 | |||
111 | /** |
||
112 | * Gets the type of the Browscap data |
||
113 | */ |
||
114 | 1 | public function getType() : ?string |
|
133 | |||
134 | /** |
||
135 | * Get an item. |
||
136 | * |
||
137 | * @param string $cacheId |
||
138 | * @param bool $withVersion |
||
139 | * @param bool $success |
||
140 | * |
||
141 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
142 | * |
||
143 | * @return mixed Data on success, null on failure |
||
144 | */ |
||
145 | 3 | public function getItem(string $cacheId, bool $withVersion = true, ?bool &$success = null) |
|
169 | |||
170 | /** |
||
171 | * save the content into an php file |
||
172 | * |
||
173 | * @param string $cacheId The cache id |
||
174 | * @param mixed $content The content to store |
||
175 | * @param bool $withVersion |
||
176 | * |
||
177 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
178 | * |
||
179 | * @return bool whether the file was correctly written to the disk |
||
180 | */ |
||
181 | 3 | public function setItem(string $cacheId, $content, bool $withVersion = true) : bool |
|
195 | |||
196 | /** |
||
197 | * Test if an item exists. |
||
198 | * |
||
199 | * @param string $cacheId |
||
200 | * @param bool $withVersion |
||
201 | * |
||
202 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
203 | * |
||
204 | * @return bool |
||
205 | */ |
||
206 | public function hasItem(string $cacheId, bool $withVersion = true) : bool |
||
214 | |||
215 | /** |
||
216 | * Remove an item. |
||
217 | * |
||
218 | * @param string $cacheId |
||
219 | * @param bool $withVersion |
||
220 | * |
||
221 | * @throws \Psr\SimpleCache\InvalidArgumentException |
||
222 | * |
||
223 | * @return bool |
||
224 | */ |
||
225 | public function removeItem(string $cacheId, bool $withVersion = true) : bool |
||
233 | |||
234 | /** |
||
235 | * Flush the whole storage |
||
236 | * |
||
237 | * @return bool |
||
238 | */ |
||
239 | public function flush() : bool |
||
243 | } |
||
244 |
Scrutinizer analyzes your
composer.json
/composer.lock
file if available to determine the classes, and functions that are defined by your dependencies.It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.