Passed
Push — master ( fb1c56...5f65a0 )
by Nils
02:30
created
src/Collector/Application/Monitoring/WebProsMonitoringCollector.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,14 +26,18 @@
 block discarded – undo
26 26
     {
27 27
         $runner = Runner::getInstance();
28 28
 
29
-        if (!$runner->fileExists(self::INI_FILE)) return [];
29
+        if (!$runner->fileExists(self::INI_FILE)) {
30
+            return [];
31
+        }
30 32
 
31 33
         $config = $runner->getFileContents(self::INI_FILE, true);
32 34
 
33 35
         $configArray = [];
34 36
 
35 37
         foreach ($config as $line) {
36
-            if (str_starts_with($line, '[')) continue;
38
+            if (str_starts_with($line, '[')) {
39
+                continue;
40
+            }
37 41
             $element = explode('=', $line);
38 42
             $configArray[$element[0]] = trim($element[1]);
39 43
         }
Please login to merge, or discard this patch.
src/Exec/Runner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         return explode("\n", trim($output));
60 60
     }
61 61
 
62
-    public function getFileContents(string $path, bool $asArray = false): string|false|array
62
+    public function getFileContents(string $path, bool $asArray = false): string | false | array
63 63
     {
64 64
         if ($asArray) {
65 65
             return file($path);
Please login to merge, or discard this patch.
src/Command/CollectCommand.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,9 @@
 block discarded – undo
75 75
                 $collector->setClient($client);
76 76
             }
77 77
 
78
-            if ($debugMode) $start = time();
78
+            if ($debugMode) {
79
+                $start = time();
80
+            }
79 81
             $collected = $collector->collect();
80 82
             if ($collected) {
81 83
                 $inventory[$collector->getIdentifier()] = $collected;
Please login to merge, or discard this patch.
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.