Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function random() |
||
24 | { |
||
25 | /** @var \yii\caching\Cache $cache */ |
||
26 | $cache = Instance::ensure($this->cache); |
||
27 | |||
28 | $items = $cache->getOrSet(__METHOD__, function(Cache $cache) { |
||
|
|||
29 | return (new \jakim\ua\UserAgent())->fetch(); |
||
30 | }, 60 * 60 * 24 * 30); |
||
31 | |||
32 | shuffle($items); |
||
33 | |||
34 | return $items['0']; |
||
35 | } |
||
36 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.