Passed
Push — master ( fb1c56...5f65a0 )
by Nils
02:30
created
src/Collector/System/Service/SystemDCollector.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,13 +124,17 @@
 block discarded – undo
124 124
         $command = "systemctl list-units --type=service --all --no-legend --no-pager | awk '{printf \"%s|%s|%s|%s|\", \$1, \$2, \$3, \$4; for (i=5; i<=NF; i++) printf \$i \" \"; print \"\"}'";
125 125
 
126 126
         $output = shell_exec($command);
127
-        if ($output === null) return [];
127
+        if ($output === null) {
128
+            return [];
129
+        }
128 130
 
129 131
         $lines = explode("\n", trim($output));
130 132
         $services = [];
131 133
 
132 134
         foreach ($lines as $line) {
133
-            if (empty($line)) continue;
135
+            if (empty($line)) {
136
+                continue;
137
+            }
134 138
             $parts = explode('|', $line);
135 139
 
136 140
             if (count($parts) >= 5) {
Please login to merge, or discard this patch.