Completed
Push — psr2 ( 3539e6...0e4e3f )
by Tony
03:02
created
app/Http/Middleware/Access.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@
 block discarded – undo
20 20
         if (Auth::guard($guard)->guest()) {
21 21
             if ($request->ajax() || $request->wantsJson()) {
22 22
                 return response('Unauthorized.', 401);
23
-            } else {
23
+            }
24
+            else {
24 25
                 return redirect()->guest('login');
25 26
             }
26 27
         }
Please login to merge, or discard this patch.
app/Http/Middleware/AdminOnly.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@
 block discarded – undo
20 20
         if (Auth::guard($guard)->guest()) {
21 21
             if ($request->ajax() || $request->wantsJson()) {
22 22
                 return response('Unauthorized.', 401);
23
-            } else {
23
+            }
24
+            else {
24 25
                 return redirect()->guest('login');
25 26
             }
26 27
         }
Please login to merge, or discard this patch.
app/Console/Commands/DeleteUser.php 1 patch
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.
app/Console/Commands/MigrateSettings.php 1 patch
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.
app/Console/Commands/AddUser.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,14 +54,16 @@  discard block
 block discarded – undo
54 54
         // set realname
55 55
         if ($this->option('realname')) {
56 56
             $user->realname = $this->option('realname');
57
-        } else {
57
+        }
58
+        else {
58 59
             $user->realname = $this->ask('Real Name');
59 60
         }
60 61
 
61 62
         // set email
62 63
         if ($this->option('email')) {
63 64
             $user->email = $this->option('email');
64
-        } else {
65
+        }
66
+        else {
65 67
             $user->email = $this->ask('Email');
66 68
         }
67 69
 
@@ -77,14 +79,16 @@  discard block
 block discarded – undo
77 79
         // set password
78 80
         if ($this->argument('password')) {
79 81
             $user->password = $this->argument('password');
80
-        } else {
82
+        }
83
+        else {
81 84
             $user->password = $this->secret('Password');
82 85
         }
83 86
 
84 87
         // save user
85 88
         if ($user->save()) {
86 89
             $this->info('User '.$user->username.' created.');
87
-        } else {
90
+        }
91
+        else {
88 92
             $this->error('Failed to create user '.$user->username);
89 93
         }
90 94
     }
Please login to merge, or discard this patch.
app/Providers/SettingsServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      */
47 47
     public function register()
48 48
     {
49
-        \App::bind('settings', function () {
49
+        \App::bind('settings', function() {
50 50
             return new \App\Settings;
51 51
         });
52 52
     }
Please login to merge, or discard this patch.
app/Providers/ValidationServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         // match the current password for the supplied user id
42 42
         Validator::extend(
43 43
             'password',
44
-            function ($attribute, $value, $parameters, $validator) {
44
+            function($attribute, $value, $parameters, $validator) {
45 45
                 return Auth::validate([
46 46
                     'user_id'  => $parameters[0],
47 47
                     'password' => $value,
Please login to merge, or discard this patch.
app/Models/Device.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
     {
151 151
         parent::boot();
152 152
 
153
-        static::deleting(function (Device $device) {
153
+        static::deleting(function(Device $device) {
154 154
             // delete related data
155 155
             $device->ports()->delete();
156 156
             $device->syslogs()->delete();
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -197,7 +197,8 @@  discard block
 block discarded – undo
197 197
         $icon = $this->icon;
198 198
         if (isset($icon)) {
199 199
             return asset('images/os/'.$icon.'.png');
200
-        } else {
200
+        }
201
+        else {
201 202
             return asset('images/os/generic.png');
202 203
         }
203 204
     }
@@ -212,11 +213,14 @@  discard block
 block discarded – undo
212 213
         $disabled = $this->disabled;
213 214
         if ($disabled == 1) {
214 215
             return 'teal';
215
-        } elseif ($ignore == 1) {
216
+        }
217
+        elseif ($ignore == 1) {
216 218
             return 'yellow';
217
-        } elseif ($status == 0) {
219
+        }
220
+        elseif ($status == 0) {
218 221
             return 'danger';
219
-        } else {
222
+        }
223
+        else {
220 224
             return 'success';
221 225
         }
222 226
     }
Please login to merge, or discard this patch.
app/Models/Notification.php 1 patch
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.