1 | <?php |
||
12 | class ActOnAll implements ExtendedCacheItemPoolInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var array|\phpFastCache\Core\Pool\ExtendedCacheItemPoolInterface[] |
||
16 | */ |
||
17 | protected $instances = []; |
||
18 | |||
19 | /** |
||
20 | * ActOnAll constructor. |
||
21 | */ |
||
22 | public function __construct() |
||
26 | |||
27 | /** |
||
28 | * @return \Closure |
||
29 | */ |
||
30 | protected function getGenericCallback() |
||
54 | |||
55 | |||
56 | /** |
||
57 | * @param string $key |
||
58 | * @return mixed |
||
59 | */ |
||
60 | public function hasItem($key) |
||
65 | |||
66 | /** |
||
67 | * @return mixed |
||
68 | */ |
||
69 | public function clear() |
||
74 | |||
75 | /** |
||
76 | * @param string $key |
||
77 | * @return mixed |
||
78 | */ |
||
79 | public function deleteItem($key) |
||
84 | |||
85 | /** |
||
86 | * @param array $keys |
||
87 | * @return mixed |
||
88 | */ |
||
89 | public function deleteItems(array $keys) |
||
94 | |||
95 | /** |
||
96 | * @param \Psr\Cache\CacheItemInterface $item |
||
97 | * @return mixed |
||
98 | */ |
||
99 | public function save(CacheItemInterface $item) |
||
104 | |||
105 | /** |
||
106 | * @param \Psr\Cache\CacheItemInterface $item |
||
107 | * @return mixed |
||
108 | */ |
||
109 | public function saveDeferred(CacheItemInterface $item) |
||
114 | |||
115 | /** |
||
116 | * @return mixed |
||
117 | */ |
||
118 | public function commit() |
||
123 | |||
124 | /** |
||
125 | * @return mixed |
||
126 | */ |
||
127 | public function getConfig() |
||
132 | |||
133 | /** |
||
134 | * @return mixed |
||
135 | */ |
||
136 | public function getDriverName() |
||
141 | |||
142 | /** |
||
143 | * @param string $key |
||
144 | * @return mixed |
||
145 | */ |
||
146 | public function getItem($key) |
||
151 | |||
152 | /** |
||
153 | * @param array $keys |
||
154 | * @return mixed |
||
155 | */ |
||
156 | public function getItems(array $keys = []) |
||
161 | |||
162 | /** |
||
163 | * @param array $keys |
||
164 | * @param int $option |
||
165 | * @param int $depth |
||
166 | * @return mixed |
||
167 | */ |
||
168 | public function getItemsAsJsonString(array $keys = [], $option = 0, $depth = 512) |
||
173 | |||
174 | /** |
||
175 | * @param \Psr\Cache\CacheItemInterface $item |
||
176 | * @return mixed |
||
177 | */ |
||
178 | public function setItem(CacheItemInterface $item) |
||
183 | |||
184 | /** |
||
185 | * @return mixed |
||
186 | */ |
||
187 | public function clean() |
||
192 | |||
193 | /** |
||
194 | * @return mixed |
||
195 | */ |
||
196 | public function getStats() |
||
201 | |||
202 | /** |
||
203 | * @param string $tagName |
||
204 | * @return mixed |
||
205 | */ |
||
206 | public function getItemsByTag($tagName) |
||
211 | |||
212 | /** |
||
213 | * @param array $tagNames |
||
214 | * @return mixed |
||
215 | */ |
||
216 | public function getItemsByTags(array $tagNames) |
||
221 | |||
222 | /** |
||
223 | * @param array $tagNames |
||
224 | * @param int $option |
||
225 | * @param int $depth |
||
226 | * @return mixed |
||
227 | */ |
||
228 | public function getItemsByTagsAsJsonString(array $tagNames, $option = 0, $depth = 512) |
||
233 | |||
234 | /** |
||
235 | * @param string $tagName |
||
236 | * @return mixed |
||
237 | */ |
||
238 | public function deleteItemsByTag($tagName) |
||
243 | |||
244 | /** |
||
245 | * @param array $tagNames |
||
246 | * @return mixed |
||
247 | */ |
||
248 | public function deleteItemsByTags(array $tagNames) |
||
253 | |||
254 | /** |
||
255 | * @param string $tagName |
||
256 | * @param int $step |
||
257 | * @return mixed |
||
258 | */ |
||
259 | public function incrementItemsByTag($tagName, $step = 1) |
||
264 | |||
265 | /** |
||
266 | * @param array $tagNames |
||
267 | * @param int $step |
||
268 | * @return mixed |
||
269 | */ |
||
270 | public function incrementItemsByTags(array $tagNames, $step = 1) |
||
275 | |||
276 | /** |
||
277 | * @param string $tagName |
||
278 | * @param int $step |
||
279 | * @return mixed |
||
280 | */ |
||
281 | public function decrementItemsByTag($tagName, $step = 1) |
||
286 | |||
287 | /** |
||
288 | * @param array $tagNames |
||
289 | * @param int $step |
||
290 | * @return mixed |
||
291 | */ |
||
292 | public function decrementItemsByTags(array $tagNames, $step = 1) |
||
297 | |||
298 | /** |
||
299 | * @param string $tagName |
||
300 | * @param array|string $data |
||
301 | * @return mixed |
||
302 | */ |
||
303 | public function appendItemsByTag($tagName, $data) |
||
308 | |||
309 | /** |
||
310 | * @param array $tagNames |
||
311 | * @param array|string $data |
||
312 | * @return mixed |
||
313 | */ |
||
314 | public function appendItemsByTags(array $tagNames, $data) |
||
319 | |||
320 | /** |
||
321 | * @param string $tagName |
||
322 | * @param array|string $data |
||
323 | * @return mixed |
||
324 | */ |
||
325 | public function prependItemsByTag($tagName, $data) |
||
330 | |||
331 | /** |
||
332 | * @param array $tagNames |
||
333 | * @param array|string $data |
||
334 | * @return mixed |
||
335 | */ |
||
336 | public function prependItemsByTags(array $tagNames, $data) |
||
341 | |||
342 | /** |
||
343 | * @param \Psr\Cache\CacheItemInterface $item |
||
344 | * @return mixed |
||
345 | */ |
||
346 | public function detachItem(CacheItemInterface $item) |
||
351 | |||
352 | /** |
||
353 | * @return mixed |
||
354 | */ |
||
355 | public function detachAllItems() |
||
360 | |||
361 | /** |
||
362 | * @param \Psr\Cache\CacheItemInterface $item |
||
363 | * @return mixed |
||
364 | */ |
||
365 | public function attachItem(CacheItemInterface $item) |
||
370 | |||
371 | /** |
||
372 | * @param \Psr\Cache\CacheItemInterface $item |
||
373 | * @return mixed |
||
374 | */ |
||
375 | public function isAttached(CacheItemInterface $item) |
||
380 | } |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.