Completed
Push — ports_ajax ( cdec2c )
by Tony
06:36
created
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function map(Router $router)
39 39
     {
40
-        $router->group(['namespace' => $this->namespace], function ($router) {
40
+        $router->group(['namespace' => $this->namespace], function($router) {
41 41
             require app_path('Http/routes.php');
42 42
         });
43 43
     }
Please login to merge, or discard this patch.
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/DeviceController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         }
68 68
         else {
69 69
             $user = User::find($request->user()->user_id);
70
-            $device =  $user->devices()->find($id);
70
+            $device = $user->devices()->find($id);
71 71
         }
72 72
         // morph the data as required
73 73
         if ($request->query('displayFormat') == 'link') {
Please login to merge, or discard this patch.
app/Api/Controllers/PortController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use App\User;
7 7
 use App\Port;
8 8
 use App\Api\Transformers\PortTransformer;
9
-
10 9
 use Illuminate\Http\Request;
11 10
 use Dingo\Api\Routing\Helpers;
12 11
 use Illuminate\Support\Facades\Input;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
             $ports = Port::all();
31 31
         }
32 32
         else {
33
-            $ports =  Auth::user()->ports()->get();
33
+            $ports = Auth::user()->ports()->get();
34 34
         }
35 35
 
36 36
         $includes = explode(',', Input::get('include'));
Please login to merge, or discard this patch.
app/Http/Controllers/PortController.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,12 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\Controllers;
4 4
 
5
-use App\User;
6 5
 use Dingo\Api\Http;
7 6
 use Dingo\Api\Routing\Helpers;
8 7
 use Illuminate\Http\Request;
9 8
 use JWTAuth;
10
-use Tymon\JWTAuth\Exceptions\JWTException;
11 9
 
12 10
 
13 11
 class PortController extends Controller
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 //        return view('ports.list', ['ports'=>$ports]);
34 34
 
35 35
         // FIXME: is this correct?
36
-	$token = JWTAuth::fromUser(auth()->user());
36
+    $token = JWTAuth::fromUser(auth()->user());
37 37
         $ports = []; // empty table
38 38
 
39 39
         return view('ports.list', ['ports'=>$port, 'token'=>$token]);
Please login to merge, or discard this patch.
app/User.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     /**
32 32
      * Test if the User is an admin or demo.
33 33
      *
34
-     * @return \Illuminate\Database\Eloquent\Builder
34
+     * @return boolean
35 35
      */
36 36
     public function isAdmin()
37 37
     {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      * Test if this user has global read access
43 43
      * these users have a level of 5, 10 or 11 (demo).
44 44
      *
45
-     * @return \Illuminate\Database\Eloquent\Builder
45
+     * @return boolean
46 46
      */
47 47
     public function hasGlobalRead()
48 48
     {
Please login to merge, or discard this patch.