Passed
Push — master ( 3cd5ab...f863cd )
by Nils
02:29
created
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/Command/InventorioCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
         $config['remote'] = $isEnabled;
112 112
 
113
-        file_put_contents($this->getConfigFile(), json_encode($config), JSON_PRETTY_PRINT);;
113
+        file_put_contents($this->getConfigFile(), json_encode($config), JSON_PRETTY_PRINT); ;
114 114
     }
115 115
 
116 116
     protected function setLogfileEnabled(bool $isEnabled): void
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         $config['logfile'] = $isEnabled;
125 125
 
126
-        file_put_contents($this->getConfigFile(), json_encode($config), JSON_PRETTY_PRINT);;
126
+        file_put_contents($this->getConfigFile(), json_encode($config), JSON_PRETTY_PRINT); ;
127 127
     }
128 128
 
129 129
     protected function setCollectEnabled(bool $isEnabled): void
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
         $config['collect'] = $isEnabled;
138 138
 
139
-        file_put_contents($this->getConfigFile(), json_encode($config), JSON_PRETTY_PRINT);;
139
+        file_put_contents($this->getConfigFile(), json_encode($config), JSON_PRETTY_PRINT); ;
140 140
     }
141 141
 
142 142
     /**
Please login to merge, or discard this patch.
src/Data/Collector/Collector.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
 {
7 7
     public function collect(): array
8 8
     {
9
-        $totalMem = (int) shell_exec("grep MemTotal /proc/meminfo | awk '{print $2}'");
10
-        $freeMem = (int) shell_exec("grep MemAvailable /proc/meminfo | awk '{print $2}'");
9
+        $totalMem = (int)shell_exec("grep MemTotal /proc/meminfo | awk '{print $2}'");
10
+        $freeMem = (int)shell_exec("grep MemAvailable /proc/meminfo | awk '{print $2}'");
11 11
 
12 12
         $usedMemPercent = ($totalMem > 0)
13 13
             ? round((($totalMem - $freeMem) / $totalMem) * 100, 1)
14 14
             : 0;
15 15
 
16
-        $loadAvg = (float) sys_getloadavg()[1];
17
-        $cpuCores = (int) shell_exec("nproc");
16
+        $loadAvg = (float)sys_getloadavg()[1];
17
+        $cpuCores = (int)shell_exec("nproc");
18 18
 
19 19
         $cpuUsagePercent = ($cpuCores > 0)
20 20
             ? round(($loadAvg / $cpuCores) * 100, 1)
Please login to merge, or discard this patch.