Passed
Push — master ( ab3547...b74b84 )
by Biao
03:48
created
src/Components/Prometheus/PrometheusExporter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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
             if (is_array($item['value'])) {
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
         $metrics = $this->getMetrics();
63 63
         $lines = [];
64 64
         foreach ($metrics as $metric) {
65
-            $lines[] = "# HELP " . $metric['name'] . " {$metric['help']}";
66
-            $lines[] = "# TYPE " . $metric['name'] . " {$metric['type']}";
65
+            $lines[] = "# HELP ".$metric['name']." {$metric['help']}";
66
+            $lines[] = "# TYPE ".$metric['name']." {$metric['type']}";
67 67
 
68 68
             $metricLabels = isset($metric['labels']) ? $metric['labels'] : [];
69 69
             $labels = ['{'];
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             }
74 74
             $labels[] = '}';
75 75
             $labelStr = implode('', $labels);
76
-            $lines[] = $metric['name'] . "$labelStr {$metric['value']}";
76
+            $lines[] = $metric['name']."$labelStr {$metric['value']}";
77 77
         }
78 78
         return implode("\n", $lines);
79 79
     }
Please login to merge, or discard this patch.