@@ -24,7 +24,7 @@ |
||
24 | 24 | public function getMetric($metric, $label, array $labelsToValues, $help = null, $type = null) { |
25 | 25 | $result = $this->getHeader('HELP', $metric, $help); |
26 | 26 | $result .= $this->getHeader('TYPE', $metric, $type); |
27 | - $result .= implode("\n", array_map(function ($value, $labelValue) use ($metric, $label) { |
|
27 | + $result .= implode("\n", array_map(function($value, $labelValue) use ($metric, $label) { |
|
28 | 28 | return $metric.'{'.$label.'="'.$labelValue.'"} '.$value; |
29 | 29 | }, $labelsToValues, array_keys($labelsToValues))); |
30 | 30 | return $result."\n"; |
@@ -77,7 +77,7 @@ |
||
77 | 77 | ->setParameter(1, $prefixedKeys, Connection::PARAM_STR_ARRAY) |
78 | 78 | ; |
79 | 79 | $measurements = []; |
80 | - foreach($keys as $key) { |
|
80 | + foreach ($keys as $key) { |
|
81 | 81 | $measurements[$key] = 'Nan'; |
82 | 82 | } |
83 | 83 | $rows = $queryBuilder->execute()->fetchAll(\PDO::FETCH_ASSOC); |
@@ -15,6 +15,9 @@ |
||
15 | 15 | |
16 | 16 | abstract public function storeMeasurement($prefix, $key, $value); |
17 | 17 | |
18 | + /** |
|
19 | + * @param string $prefix |
|
20 | + */ |
|
18 | 21 | abstract public function getMeasurements($prefix, array $keys); |
19 | 22 | |
20 | 23 | } |