Passed
Push — main ( 0b9d15...079b27 )
by mohsen
03:01
created
src/Commands/MonitorCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function handle()
47 47
     {
48
-        $logs = [];
48
+        $logs = [ ];
49 49
 
50 50
         $cpuUsage = $this->cpu->check();
51 51
         $memoryUsage = $this->memory->check();
@@ -54,29 +54,29 @@  discard block
 block discarded – undo
54 54
         $webServerStatuses = $this->webServer->check();
55 55
 
56 56
         if (config('stethoscope.monitorable_resources.cpu') && $cpuUsage > config(('stethoscope.thresholds.cpu'))) {
57
-            $logs['cpu'] = $cpuUsage;
57
+            $logs[ 'cpu' ] = $cpuUsage;
58 58
         }
59 59
 
60 60
         if ($memoryUsage > config(('stethoscope.thresholds.memory')) && config('stethoscope.monitorable_resources.memory')) {
61
-            $logs['memory'] = $memoryUsage;
61
+            $logs[ 'memory' ] = $memoryUsage;
62 62
         }
63 63
 
64 64
         if ($networkStatus == 'disconnected' && config('stethoscope.monitorable_resources.network')) {
65
-            $logs['network'] = $networkStatus;
65
+            $logs[ 'network' ] = $networkStatus;
66 66
         }
67 67
 
68 68
         if ($storageFreeSpace < config(('stethoscope.thresholds.storage')) && config('stethoscope.monitorable_resources.storage')) {
69
-            $logs['storage'] = $storageFreeSpace;
69
+            $logs[ 'storage' ] = $storageFreeSpace;
70 70
         }
71 71
 
72 72
         if ($webServerStatuses != 'active' && config('stethoscope.monitorable_resources.web_server')) {
73
-            $logs['webServer'] = $webServerStatuses;
73
+            $logs[ 'webServer' ] = $webServerStatuses;
74 74
         }
75 75
 
76 76
         Record::record($logs);
77 77
 
78
-        if (! empty($logs)) {
79
-            $logs['signature'] = $this->signature;
78
+        if (!empty($logs)) {
79
+            $logs[ 'signature' ] = $this->signature;
80 80
             TroubleOccurred::dispatch($logs);
81 81
         }
82 82
     }
Please login to merge, or discard this patch.