Completed
Push — psr2 ( 0e4e3f...2acfb2 )
by Tony
03:42
created
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         Route::group([
55 55
             'middleware' => 'web',
56 56
             'namespace' => $this->namespace,
57
-        ], function ($router) {
57
+        ], function($router) {
58 58
             require base_path('routes/web.php');
59 59
         });
60 60
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             'middleware' => ['api', 'jwt-auth'],
73 73
             'namespace' => $this->namespace,
74 74
             'prefix' => 'api',
75
-        ], function ($router) {
75
+        ], function($router) {
76 76
             require base_path('routes/api.php');
77 77
         });
78 78
     }
Please login to merge, or discard this patch.
app/Providers/BroadcastServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         /*
20 20
          * Authenticate the user's personal channel...
21 21
          */
22
-        Broadcast::channel('App.User.*', function ($user, $userId) {
22
+        Broadcast::channel('App.User.*', function($user, $userId) {
23 23
             return (int) $user->id === (int) $userId;
24 24
         });
25 25
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Widgets/WidgetDataController.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,6 @@
 block discarded – undo
60 60
     /**
61 61
      * Display the alerts widget.
62 62
      *
63
-     * @param AlertsDataTable $dataTable
64 63
      * @param null $action
65 64
      * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View
66 65
      */
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,8 @@  discard block
 block discarded – undo
52 52
         if ($request->device_id) {
53 53
             return $EventlogDataTable->forDevice($request->device_id)
54 54
                 ->render('widgets.eventlog', compact(['tableName', 'action']));
55
-        } else {
55
+        }
56
+        else {
56 57
             return $EventlogDataTable->render('widgets.eventlog', compact(['tableName', 'action']));
57 58
         }
58 59
     }
@@ -95,7 +96,8 @@  discard block
 block discarded – undo
95 96
         $uptime = Settings::get('uptime_warning', 84600);
96 97
         if ($request->user()->hasGlobalRead()) {
97 98
             $devices = Device::where('ignore', '=', 0)->get();
98
-        } else {
99
+        }
100
+        else {
99 101
             $devices = User::find($request->user()->user_id)->devices()->where('ignore', '=', 0)->get();
100 102
         }
101 103
         $count = ['warn' => 0, 'up' => 0, 'down' => 0];
@@ -103,10 +105,12 @@  discard block
 block discarded – undo
103 105
             if ($device->status == 1) {
104 106
                 if (($device->uptime < $uptime) && ($device->uptime != '0')) {
105 107
                     $count['warn']++;
106
-                } else {
108
+                }
109
+                else {
107 110
                     $count['up']++;
108 111
                 }
109
-            } else {
112
+            }
113
+            else {
110 114
                 $count['down']++;
111 115
             }
112 116
         }
@@ -137,7 +141,8 @@  discard block
 block discarded – undo
137 141
             $count['ports']['down'] = Port::isDown()->count();
138 142
             $count['ports']['ignored'] = Port::isIgnored()->count();
139 143
             $count['ports']['disabled'] = Port::isDisabled()->count();
140
-        } else {
144
+        }
145
+        else {
141 146
             $user = User::find($request->user()->user_id);
142 147
 
143 148
             $count['devices']['total'] = $user->devices()->count();
Please login to merge, or discard this patch.
app/DataTables/General/EventlogDataTable.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -195,7 +195,8 @@
 block discarded – undo
195 195
         $user = \Auth::user();
196 196
         if (!is_null($user) && $user->isAdmin()) {
197 197
             return false;
198
-        } else {
198
+        }
199
+        else {
199 200
             return 'auth';
200 201
         }
201 202
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         return $this->datatables
44 44
             ->eloquent($this->query())
45
-            ->editColumn('device.hostname', function ($eventlog) {
45
+            ->editColumn('device.hostname', function($eventlog) {
46 46
                 $hostname = is_null($eventlog->device) ? trans('devices.text.deleted') : $eventlog->device->hostname;
47 47
                 return '<a href="'.url("devices/".$eventlog->device_id).'">'.$hostname.'</a>';
48 48
             })
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     public function getAjax()
107 107
     {
108
-        return url('eventlog?device_id=' . $this->device_id);
108
+        return url('eventlog?device_id='.$this->device_id);
109 109
     }
110 110
 
111 111
     public function forDevice($device_id)
Please login to merge, or discard this patch.
app/Data/RRDXport.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,8 @@
 block discarded – undo
64 64
 
65 65
         if ($format == 'json') {
66 66
             return $this->jsonSerialize();
67
-        } elseif ($format == 'csv') {
67
+        }
68
+        elseif ($format == 'csv') {
68 69
             return $this->csvSerialize();
69 70
         }
70 71
         return null;  // shouldn't get here
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         } elseif ($format == 'csv') {
66 66
             return $this->csvSerialize();
67 67
         }
68
-        return null;  // shouldn't get here
68
+        return null; // shouldn't get here
69 69
     }
70 70
 
71 71
     /**
Please login to merge, or discard this patch.
app/Data/RRD.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -191,8 +191,8 @@  discard block
 block discarded – undo
191 191
     public static function escape($string, $length = null)
192 192
     {
193 193
         $result = shorten_interface_type($string);
194
-        $result = str_replace("'", '', $result);            # remove quotes
195
-        $result = str_replace('%', '%%', $result);          # double percent signs
194
+        $result = str_replace("'", '', $result); # remove quotes
195
+        $result = str_replace('%', '%%', $result); # double percent signs
196 196
         if (is_numeric($length) && strlen($string) > $length) {
197 197
             $extra = substr_count($string, ':', 0, $length);
198 198
             $result = substr(str_pad($result, $length), 0, ($length + $extra));
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             }
202 202
         }
203 203
 
204
-        $result = str_replace(':', '\:', $result);          # escape colons
204
+        $result = str_replace(':', '\:', $result); # escape colons
205 205
         return $result.' ';
206 206
     }
207 207
 }
Please login to merge, or discard this patch.
app/Graphs/Device/Storage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         if ($this->hasIDs()) {
35 35
             return [
36
-                'storage' => function (Builder $query) {
36
+                'storage' => function(Builder $query) {
37 37
                     $query->whereIn('storage_id', $this->getIDs());
38 38
                 },
39 39
             ];
Please login to merge, or discard this patch.
app/Graphs/Device/Processor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         if ($this->hasIDs()) {
35 35
             return [
36
-                'processors' => function (Builder $query) {
36
+                'processors' => function(Builder $query) {
37 37
                     $query->whereIn('processor_id', $this->getIDs());
38 38
                 },
39 39
             ];
Please login to merge, or discard this patch.
app/Graphs/Device/Bits.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         if ($this->hasIDs()) {
35 35
             return [
36
-                'ports' => function (Builder $query) {
36
+                'ports' => function(Builder $query) {
37 37
                     $query->whereIn('port_id', $this->getIDs());
38 38
                 },
39 39
             ];
Please login to merge, or discard this patch.