Passed
Push — master ( af36fa...585457 )
by Nils
02:48
created
src/Collector/System/Security/GeneralSecurityCollector.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,9 @@  discard block
 block discarded – undo
54 54
 
55 55
         $runner = Runner::getInstance();
56 56
 
57
-        if (!$runner->commandExists('apt')) return false;
57
+        if (!$runner->commandExists('apt')) {
58
+            return false;
59
+        }
58 60
 
59 61
         return !empty($runner->run('apt-cache show unattended-upgrades 2>/dev/null')->getOutput());
60 62
     }
@@ -84,7 +86,9 @@  discard block
 block discarded – undo
84 86
 
85 87
         foreach ($lines as $line) {
86 88
             $line = trim(preg_replace('/#.*/', '', $line)); // Kommentare entfernen
87
-            if ($line === '') continue;
89
+            if ($line === '') {
90
+                continue;
91
+            }
88 92
 
89 93
             if (preg_match('/^\s*(\w+)\s+(yes|no)\s*$/i', $line, $matches)) {
90 94
                 $key = strtolower($matches[1]);
Please login to merge, or discard this patch.
src/Collector/System/Ports/PortsCollector.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 
51 51
     private function parseListeningPorts(): array
52 52
     {
53
-        if(!Runner::getInstance()->commandExists("ss")) return [];
53
+        if (!Runner::getInstance()->commandExists("ss")) return [];
54 54
 
55 55
         $output = Runner::outputToArray(Runner::getInstance()->run("ss -tuln")->getOutput());
56 56
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@
 block discarded – undo
50 50
 
51 51
     private function parseListeningPorts(): array
52 52
     {
53
-        if(!Runner::getInstance()->commandExists("ss")) return [];
53
+        if(!Runner::getInstance()->commandExists("ss")) {
54
+            return [];
55
+        }
54 56
 
55 57
         $output = Runner::outputToArray(Runner::getInstance()->run("ss -tuln")->getOutput());
56 58
 
Please login to merge, or discard this patch.
src/Metrics/Memory/Memory.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,12 +47,16 @@
 block discarded – undo
47 47
 
48 48
     public function getNumberOfGreaterThan(string $key, int $threshold): int
49 49
     {
50
-        if (!array_key_exists($key, $this->data)) return 0;
50
+        if (!array_key_exists($key, $this->data)) {
51
+            return 0;
52
+        }
51 53
 
52 54
         $count = 0;
53 55
 
54 56
         foreach ($this->data[$key] as $value) {
55
-            if ($value >= $threshold) $count++;
57
+            if ($value >= $threshold) {
58
+                $count++;
59
+            }
56 60
         }
57 61
 
58 62
         return $count;
Please login to merge, or discard this patch.