Test Setup Failed
Branch master (730ea3)
by alexfloppy
03:06
created
app/Models/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      */
45 45
     public function getJWTIdentifier()
46 46
     {
47
-        return $this->getKey();  // Eloquent model method
47
+        return $this->getKey(); // Eloquent model method
48 48
     }
49 49
 
50 50
     /**
Please login to merge, or discard this patch.
app/Http/Kernel.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
             'throttle:60,1',
38 38
             'bindings',
39 39
         ],
40
-        'json-api' => []
40
+        'json-api' => [ ]
41 41
     ];
42 42
 
43 43
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/WebAuth/RegisterController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@
 block discarded – undo
67 67
     protected function create(array $data)
68 68
     {
69 69
         return User::create([
70
-            'name'     => $data['name'],
71
-            'email'    => $data['email'],
72
-            'password' => bcrypt($data['password']),
70
+            'name'     => $data[ 'name' ],
71
+            'email'    => $data[ 'email' ],
72
+            'password' => bcrypt($data[ 'password' ]),
73 73
         ]);
74 74
     }
75 75
 
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +3 added lines, -3 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',
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
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             'middleware' => 'json-api:v1',
91 91
             'namespace' => $this->namespace,
92 92
             'prefix' => 'api/v1'
93
-        ], function ($router) {
93
+        ], function($router) {
94 94
             require base_path('routes/json-api-v1.php');
95 95
         });
96 96
     }
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/WebAuth/LoginController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public function __construct()
40 40
     {
41
-        $this->middleware('guest', ['except' => 'logout']);
41
+        $this->middleware('guest', [ 'except' => 'logout' ]);
42 42
     }
43 43
 
44 44
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/Api/v1/Auth/LoginController.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     /**
110 110
      * @param Request $request
111
-     * @param $user
111
+     * @param \Illuminate\Contracts\Auth\Authenticatable|null $user
112 112
      * @param string $token
113 113
      *
114 114
      * @return JsonResponse
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      *   @SWG\Response(response="200", description="Return token or error message")
139 139
      * )
140 140
      *
141
-     * @return Response
141
+     * @return JsonResponse
142 142
      */
143 143
     public function logout()
144 144
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function __construct()
42 42
     {
43
-        $this->middleware('guest', ['except' => 'logout']);
43
+        $this->middleware('guest', [ 'except' => 'logout' ]);
44 44
     }
45 45
 
46 46
     /**
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
                 return $this->sendLoginResponse($request, $token);
89 89
             } else {
90 90
                 $error = [
91
-                    'source' => ['email' => $request->get('email')],
92
-                    'email' => ['Email not verified']
91
+                    'source' => [ 'email' => $request->get('email') ],
92
+                    'email' => [ 'Email not verified' ]
93 93
                 ];
94 94
                 return $this->sendFailedResponse($error, 403);
95 95
             }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $this->incrementLoginAttempts($request);
100 100
 
101 101
         $error = [
102
-            'email' => ['Invalid credentials. Please check login/password and try again']
102
+            'email' => [ 'Invalid credentials. Please check login/password and try again' ]
103 103
         ];
104 104
 
105 105
         return $this->sendFailedResponse($error, 401);
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@
 block discarded – undo
67 67
     protected function unauthenticated($request, AuthenticationException $exception)
68 68
     {
69 69
         if ($request->expectsJson()) {
70
-            return response()->json(['errors' => [
71
-                [Error::STATUS => 401, Error::TITLE => 'Authentication error',  Error::DETAIL => 'Unauthenticated']]
70
+            return response()->json([ 'errors' => [
71
+                [ Error::STATUS => 401, Error::TITLE => 'Authentication error', Error::DETAIL => 'Unauthenticated' ] ]
72 72
                 ], 401);
73 73
         }
74 74
 
Please login to merge, or discard this patch.
app/Http/Controllers/Api/v1/Auth/RegisterController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
     protected function create(array $data)
81 81
     {
82 82
         $user = User::create([
83
-            'name' => $data['name'],
84
-            'email' => $data['email'],
85
-            'password' => bcrypt($data['password'])
83
+            'name' => $data[ 'name' ],
84
+            'email' => $data[ 'email' ],
85
+            'password' => bcrypt($data[ 'password' ])
86 86
         ]);
87 87
 
88 88
         return $user;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             return $this->sendLoginResponse($token, $user);
168 168
         }
169 169
 
170
-        $error = ['activation_hash' => ['Wrong activation hash']];
170
+        $error = [ 'activation_hash' => [ 'Wrong activation hash' ] ];
171 171
 
172 172
         return $this->sendFailedResponse($error, self::HTTP_CODE_BAD_REQUEST);
173 173
     }
Please login to merge, or discard this patch.