Completed
Push — main ( f1cf78...4d91e8 )
by mohsen
15s queued 13s
created
src/Http/Middleware/CheckAccessToMonitoringPanel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function handle($request, Closure $next)
10 10
     {
11
-        if (! config('stethoscope.monitoring_panel.status')) {
11
+        if (!config('stethoscope.monitoring_panel.status')) {
12 12
             abort(404);
13 13
         }
14 14
 
Please login to merge, or discard this patch.
src/Http/Controllers/MonitorController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function history($from, $to)
28 28
     {
29
-        $resourceLogs = ResourceLog::where('created_at', '>=', $from.' 00:00:00')
30
-            ->where('created_at', '<=', $to.' 23:59:59')
29
+        $resourceLogs = ResourceLog::where('created_at', '>=', $from . ' 00:00:00')
30
+            ->where('created_at', '<=', $to . ' 23:59:59')
31 31
             ->select(DB::raw('date(created_at) as date'), 'resource')
32 32
             ->get();
33 33
 
34
-        $labels = [];
34
+        $labels = [ ];
35 35
         foreach (CarbonPeriod::create($from, $to) as $date) {
36 36
             array_push($labels, $date->format('Y-m-d'));
37 37
         }
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 
51 51
     protected function resourceLogCount($resource, $labels, $resourceLogs)
52 52
     {
53
-        $logCount = [];
53
+        $logCount = [ ];
54 54
         foreach ($labels as $label) {
55
-            $resourceCount = $resourceLogs->countBy(function ($resourceLogs) use ($resource, $label) {
56
-                return $resourceLogs['resource'] == $resource && $resourceLogs['date'] == $label;
55
+            $resourceCount = $resourceLogs->countBy(function($resourceLogs) use ($resource, $label) {
56
+                return $resourceLogs[ 'resource' ] == $resource && $resourceLogs[ 'date' ] == $label;
57 57
             });
58
-            array_push($logCount, count($resourceCount) > 1 ? $resourceCount[1] : 0);
58
+            array_push($logCount, count($resourceCount) > 1 ? $resourceCount[ 1 ] : 0);
59 59
         }
60 60
 
61 61
         return $logCount;
Please login to merge, or discard this patch.