Completed
Pull Request — develop (#106)
by Neil
20:09
created
app/Http/Middleware/Authenticate.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/Api/Controllers/WidgetController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     /**
16 16
      * Display a listing of all widgets
17 17
      *
18
-     * @return \Illuminate\Http\Response
18
+     * @return \Illuminate\Database\Eloquent\Collection
19 19
      */
20 20
     public function index(Request $request)
21 21
     {
Please login to merge, or discard this patch.
app/Models/UsersWidgets.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     // ---- Define Relationships ----
65 65
 
66 66
     /**
67
-     * @return \Illuminate\Database\Eloquent\Relations\HasOne
67
+     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
68 68
      */
69 69
     public function user()
70 70
     {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     }
81 81
 
82 82
     /**
83
-     * @return \Illuminate\Database\Eloquent\Relations\HasOne
83
+     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
84 84
      */
85 85
     public function dashboard()
86 86
     {
Please login to merge, or discard this patch.
app/Settings.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@
 block discarded – undo
185 185
      * Or when the user is not a global admin.
186 186
      *
187 187
      * @param string $key The path to check
188
-     * @return bool|string false or the source: config | auth
188
+     * @return string|false false or the source: config | auth
189 189
      */
190 190
     public function isReadOnly($key)
191 191
     {
Please login to merge, or discard this 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/DataTables/Alerting/LogsDataTable.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,8 @@
 block discarded – undo
102 102
             } catch(\Exception $e) {
103 103
                 if(starts_with($e->getMessage(), 'unserialize():')) {
104 104
                     return $value;
105
-                } else {
105
+                }
106
+                else {
106 107
                     throw $e;
107 108
                 }
108 109
             }
Please login to merge, or discard this patch.