Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function getPost(int $postId, bool $force = false): array |
||
23 | { |
||
24 | $cacheKey = sprintf('%s.post.%d', self::CACHE_KEY_PREFIX, $postId); |
||
25 | |||
26 | if ($force) { |
||
27 | $this->cache->delete($cacheKey); |
||
28 | } |
||
29 | |||
30 | $post = $this->cache->get($cacheKey, function (ItemInterface $item) use ($postId) { |
||
|
|||
31 | return $this->api->post($postId); |
||
32 | }); |
||
33 | |||
34 | return $post; |
||
35 | } |
||
48 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.