Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
38 | public function getMeasurements($prefix, array $keys, $defaultValue = 'Nan') { |
||
39 | $measurements = []; |
||
40 | $prefixedKeys = array_map(function($key) use ($prefix) { |
||
41 | return $prefix.':'.$key; |
||
42 | }, $keys); |
||
43 | foreach ($this->redis->mget($prefixedKeys) as $i => $value) { |
||
44 | $measurements[$keys[$i]] = $value !== false ? (float)$value : $defaultValue; |
||
45 | } |
||
46 | return $measurements; |
||
47 | } |
||
48 | } |
||
49 |