Completed
Pull Request — develop (#121)
by Neil
03:37
created
app/DataTables/BaseDataTable.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
      */
84 84
     public function getAjax()
85 85
     {
86
-       return '';    
86
+        return '';    
87 87
     }
88 88
 
89 89
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Widgets/WidgetDataController.php 3 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,6 @@  discard block
 block discarded – undo
108 108
     /**
109 109
      * Display the device-summary widget.
110 110
      *
111
-     * @param  string|null  $type
112 111
      * @return \Illuminate\Http\Response|null
113 112
      */
114 113
     public function device_summary(Request $request)
@@ -148,7 +147,6 @@  discard block
 block discarded – undo
148 147
     /**
149 148
      * Display the Worldmap widget.
150 149
      *
151
-     * @param  string|null  $type
152 150
      * @return \Illuminate\Http\Response|null
153 151
      */
154 152
     public function worldmap(Request $request)
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@
 block discarded – undo
29 29
 use App\DataTables\General\EventlogDataTable;
30 30
 use App\DataTables\General\SyslogDataTable;
31 31
 use App\Http\Controllers\Controller;
32
-use App\Settings;
33 32
 use App\Models\Device;
34 33
 use App\Models\Port;
35 34
 use App\Models\User;
35
+use App\Settings;
36 36
 use Illuminate\Http\Request;
37 37
 
38 38
 class WidgetDataController extends Controller
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function availability_map(Settings $settings, Request $request)
76 76
     {
77
-        $uptime  = $settings->get('uptime_warning');
77
+        $uptime = $settings->get('uptime_warning');
78 78
         if ($request->user()->hasGlobalRead())
79 79
         {
80 80
             $devices = Device::where('ignore', '=', 0)->get();
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         {
84 84
             $devices = User::find($request->user()->user_id)->devices()->where('ignore', '=', 0)->get();
85 85
         }
86
-        $count   = ['warn' => 0, 'up' => 0, 'down' => 0];
86
+        $count = ['warn' => 0, 'up' => 0, 'down' => 0];
87 87
         foreach ($devices as $device)
88 88
         {
89 89
             if ($device->status == 1)
Please login to merge, or discard this patch.
app/Models/Port.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
     public function scopePortUp($query)
234 234
     {
235 235
         return $query->where([
236
-            ['deleted',      '=', 0],
237
-            ['ignore',       '=', 0],
236
+            ['deleted', '=', 0],
237
+            ['ignore', '=', 0],
238 238
             ['ifOperStatus', '=', 'up']
239 239
         ]);
240 240
     }
@@ -242,9 +242,9 @@  discard block
 block discarded – undo
242 242
     public function scopePortDown($query)
243 243
     {
244 244
         return $query->where([
245
-            ['deleted',       '=', 0],
246
-            ['ignore',        '=', 0],
247
-            ['ifOperStatus',  '=', 'down'],
245
+            ['deleted', '=', 0],
246
+            ['ignore', '=', 0],
247
+            ['ifOperStatus', '=', 'down'],
248 248
             ['ifAdminStatus', '=', 'up']
249 249
         ]);
250 250
     }
@@ -252,16 +252,16 @@  discard block
 block discarded – undo
252 252
     public function scopePortIgnored($query)
253 253
     {
254 254
         return $query->where([
255
-            ['deleted',       '=', 0],
256
-            ['ignore',        '=', 1]
255
+            ['deleted', '=', 0],
256
+            ['ignore', '=', 1]
257 257
         ]);
258 258
     }
259 259
 
260 260
     public function scopePortDisabled($query)
261 261
     {
262 262
         return $query->where([
263
-            ['deleted',       '=', 0],
264
-            ['ignore',        '=', 0],
263
+            ['deleted', '=', 0],
264
+            ['ignore', '=', 0],
265 265
             ['ifAdminStatus', '=', 'down']
266 266
         ]);
267 267
     }
Please login to merge, or discard this patch.
app/Models/Device.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
     public function scopeDeviceUp($query)
258 258
     {
259 259
         return $query->where([
260
-            ['status',   '=', 1],
261
-            ['ignore',   '=', 0],
260
+            ['status', '=', 1],
261
+            ['ignore', '=', 0],
262 262
             ['disabled', '=', 0]
263 263
         ]);
264 264
     }
@@ -266,8 +266,8 @@  discard block
 block discarded – undo
266 266
     public function scopeDeviceDown($query)
267 267
     {
268 268
         return $query->where([
269
-            ['status',   '=', 0],
270
-            ['ignore',   '=', 0],
269
+            ['status', '=', 0],
270
+            ['ignore', '=', 0],
271 271
             ['disabled', '=', 0]
272 272
         ]);
273 273
     }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     public function scopeDeviceIgnored($query)
276 276
     {
277 277
         return $query->where([
278
-            ['ignore',   '=', 1],
278
+            ['ignore', '=', 1],
279 279
             ['disabled', '=', 0]
280 280
         ]);
281 281
     }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
     public function scopeDeviceNotIgnored($query)
284 284
     {
285 285
         return $query->where([
286
-            ['ignore',   '=', 0]
286
+            ['ignore', '=', 0]
287 287
         ]);
288 288
     }
289 289
 
Please login to merge, or discard this patch.