Test Failed
Push — vue-test ( 556454...707e52 )
by Tony
04:08
created
app/Api/Controllers/WidgetDataController.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,7 +121,8 @@  discard block
 block discarded – undo
121 121
         $uptime = Settings::get('uptime_warning', 84600);
122 122
         if ($request->user()->hasGlobalRead()) {
123 123
             $devices = Device::where('ignore', '=', 0)->get();
124
-        } else {
124
+        }
125
+        else {
125 126
             $devices = User::find($request->user()->user_id)->devices()->where('ignore', '=', 0)->get();
126 127
         }
127 128
         $counts = ['warn' => 0, 'up' => 0, 'down' => 0];
@@ -129,10 +130,12 @@  discard block
 block discarded – undo
129 130
             if ($device->status == 1) {
130 131
                 if (($device->uptime < $uptime) && ($device->uptime != '0')) {
131 132
                     $counts['warn']++;
132
-                } else {
133
+                }
134
+                else {
133 135
                     $counts['up']++;
134 136
                 }
135
-            } else {
137
+            }
138
+            else {
136 139
                 $counts['down']++;
137 140
             }
138 141
         }
Please login to merge, or discard this patch.