Passed
Push — master ( 77084d...9a42cc )
by Nils
08:42 queued 05:57
created
src/Collector/Package/Dpkg/DpkgPackageCollector.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,9 @@
 block discarded – undo
44 44
         $packages = [];
45 45
 
46 46
         foreach ($lines as $line) {
47
-            if (trim($line) === '') continue;
47
+            if (trim($line) === '') {
48
+                continue;
49
+            }
48 50
 
49 51
             if (preg_match('/^([^\s\/]+)\/[^\s]+\s+([^\s]+).*upgradable from: ([^\]]+)/', $line, $matches)) {
50 52
                 $packages[$matches[1]] = [
Please login to merge, or discard this patch.
src/Util/WebsiteUtil.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@
 block discarded – undo
10 10
     {
11 11
         if (!array_key_exists(ApacheServerNameCollector::COLLECTION_IDENTIFIER, $inventory)
12 12
             || !is_array($inventory[ApacheServerNameCollector::COLLECTION_IDENTIFIER])
13
-        ) return [];
13
+        ) {
14
+            return [];
15
+        }
14 16
 
15 17
         $configs = $inventory[ApacheServerNameCollector::COLLECTION_IDENTIFIER];
16 18
 
Please login to merge, or discard this patch.
src/Collector/Website/HeaderCollector.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,9 @@
 block discarded – undo
36 36
         foreach ($domains as $domain) {
37 37
             try {
38 38
                 $url = $domain;
39
-                if (!str_starts_with($url, 'http')) $url = 'https://' . $url;
39
+                if (!str_starts_with($url, 'http')) {
40
+                    $url = 'https://' . $url;
41
+                }
40 42
                 $response = $this->client->get($url);
41 43
             } catch (ClientException $e) {
42 44
                 $response = $e->getResponse();
Please login to merge, or discard this patch.
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 2 patches
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.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
     public function hasData(string $key): bool
44 44
     {
45
-       return array_key_exists($key, $this->data);
45
+        return array_key_exists($key, $this->data);
46 46
     }
47 47
 
48 48
     public function getData(string $key): array
Please login to merge, or discard this patch.
src/Command/InitCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
             $serverName = $io->ask(
130 130
                 'Please provide the name of the server (default: ' . $defaultName . ')',
131 131
                 $defaultName,
132
-                function (?string $value) {
132
+                function(?string $value) {
133 133
                     if (strlen($value ?? '') < 3) {
134 134
                         throw new RuntimeException('The server name has to be at least three characters long.');
135 135
                     }
Please login to merge, or discard this patch.
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/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.