@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | 'value' => $apcSmaInfo['avail_mem'], |
31 | 31 | ], |
32 | 32 | ]; |
33 | - foreach (new \APCuIterator('/^' . $this->config['apcu_key_prefix'] . $this->config['apcu_key_separator'] . '/') as $item) { |
|
33 | + foreach (new \APCuIterator('/^'.$this->config['apcu_key_prefix'].$this->config['apcu_key_separator'].'/') as $item) { |
|
34 | 34 | $parts = explode($this->config['apcu_key_separator'], $item['key']); |
35 | 35 | parse_str($parts[3], $labels); |
36 | 36 | $metrics[] = [ |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | $metrics = $this->getMetrics(); |
52 | 52 | $lines = []; |
53 | 53 | foreach ($metrics as $metric) { |
54 | - $lines[] = "# HELP " . $metric['name'] . " {$metric['help']}"; |
|
55 | - $lines[] = "# TYPE " . $metric['name'] . " {$metric['type']}"; |
|
54 | + $lines[] = "# HELP ".$metric['name']." {$metric['help']}"; |
|
55 | + $lines[] = "# TYPE ".$metric['name']." {$metric['type']}"; |
|
56 | 56 | |
57 | 57 | $metricLabels = isset($metric['labels']) ? $metric['labels'] : []; |
58 | 58 | $labels = ['{']; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | } |
64 | 64 | $labels[] = '}'; |
65 | 65 | $labelStr = implode('', $labels); |
66 | - $lines[] = $metric['name'] . "$labelStr {$metric['value']}"; |
|
66 | + $lines[] = $metric['name']."$labelStr {$metric['value']}"; |
|
67 | 67 | } |
68 | 68 | return implode("\n", $lines); |
69 | 69 | } |