Completed
Push — fixes ( 6830e4...798510 )
by Tony
03:34
created
app/Http/Requests/UpdateUserRequest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
     {
56 56
         if ($this->input('password')) {
57 57
             $rules = ['password'              => 'required|min:5|max:255',
58
-                      'password_confirmation' => 'required|same:password',
58
+                        'password_confirmation' => 'required|same:password',
59 59
             ];
60 60
             if (!Auth::user()->isAdmin()) {
61 61
                 $rules['current_password'] = 'required|password:user_id';
Please login to merge, or discard this patch.
app/Http/Controllers/UserController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     /**
45 45
      * Update a notifications status.
46 46
      *
47
-     * @return \Illuminate\Http\Response
47
+     * @return \Illuminate\Http\JsonResponse
48 48
      */
49 49
     public function update($id, $action)
50 50
     {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * Create a new notification
57 57
      *
58
-     * @return \Illuminate\Http\Response
58
+     * @return \Illuminate\Http\JsonResponse
59 59
      */
60 60
     public function create(Request $request)
61 61
     {
Please login to merge, or discard this patch.
app/Http/Controllers/UserPortController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param AdminOnlyRequest $request
47 47
      * @param $user_id
48 48
      * @param $port_id
49
-     * @return mixed
49
+     * @return \Illuminate\Http\RedirectResponse
50 50
      */
51 51
     public function store(AdminOnlyRequest $request, $user_id)
52 52
     {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param AdminOnlyRequest $request
70 70
      * @param $user_id
71 71
      * @param $port_id
72
-     * @return mixed
72
+     * @return \Illuminate\Http\RedirectResponse
73 73
      */
74 74
     public function destroy(AdminOnlyRequest $request, $user_id, $port_id)
75 75
     {
Please login to merge, or discard this patch.
app/Http/Controllers/UserDeviceController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param AdminOnlyRequest $request
47 47
      * @param $user_id
48 48
      * @param $port_id
49
-     * @return mixed
49
+     * @return \Illuminate\Http\RedirectResponse
50 50
      */
51 51
     public function store(AdminOnlyRequest $request, $user_id)
52 52
     {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param AdminOnlyRequest $request
70 70
      * @param $user_id
71 71
      * @param $port_id
72
-     * @return mixed
72
+     * @return \Illuminate\Http\RedirectResponse
73 73
      */
74 74
     public function destroy(AdminOnlyRequest $request, $user_id, $port_id)
75 75
     {
Please login to merge, or discard this patch.
app/Http/Controllers/Widgets/WidgetDataController.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,7 +82,8 @@  discard block
 block discarded – undo
82 82
         $uptime = Settings::get('uptime_warning', 84600);
83 83
         if ($request->user()->hasGlobalRead()) {
84 84
             $devices = Device::where('ignore', '=', 0)->get();
85
-        } else {
85
+        }
86
+        else {
86 87
             $devices = User::find($request->user()->user_id)->devices()->where('ignore', '=', 0)->get();
87 88
         }
88 89
         $count = ['warn' => 0, 'up' => 0, 'down' => 0];
@@ -90,10 +91,12 @@  discard block
 block discarded – undo
90 91
             if ($device->status == 1) {
91 92
                 if (($device->uptime < $uptime) && ($device->uptime != '0')) {
92 93
                     $count['warn']++;
93
-                } else {
94
+                }
95
+                else {
94 96
                     $count['up']++;
95 97
                 }
96
-            } else {
98
+            }
99
+            else {
97 100
                 $count['down']++;
98 101
             }
99 102
         }
@@ -122,7 +125,8 @@  discard block
 block discarded – undo
122 125
             $count['ports']['down'] = Port::isDown()->count();
123 126
             $count['ports']['ignored'] = Port::isIgnored()->count();
124 127
             $count['ports']['disabled'] = Port::isDisabled()->count();
125
-        } else {
128
+        }
129
+        else {
126 130
             $user = User::find($request->user()->user_id);
127 131
 
128 132
             $count['devices']['total'] = $user->devices()->count();
Please login to merge, or discard this patch.
app/Api/Controllers/DashboardWidgetController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      */
74 74
     public function show(Request $request, $id)
75 75
     {
76
-        $widget  = Widgets::find($id);
76
+        $widget = Widgets::find($id);
77 77
         return array('widget' => $widget);
78 78
     }
79 79
 
Please login to merge, or discard this patch.
app/Settings.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -242,11 +242,13 @@
 block discarded – undo
242 242
                     if (is_string($k) && !str_contains($k, '.') && DbConfig::exactKey($key)->exists() && DbConfig::key($key)->count() == 1) {
243 243
                         // check that we aren't trying to set an array onto an existing value only setting
244 244
                         throw new \Exception("Attempting to set array value to existing non-array value at the key '".$key."'");
245
-                    } else {
245
+                    }
246
+                    else {
246 247
                         // we are not at the leaf yet, add this chunk to the key and recurse
247 248
                         $this->set($key.'.'.$k, $v);
248 249
                     }
249
-                } else {
250
+                }
251
+                else {
250 252
                     // a leaf, recurse one last time
251 253
                     $this->set($k, $v);
252 254
                 }
Please login to merge, or discard this patch.