Completed
Branch master (167c37)
by Igor
11:16
created
app/Providers/RouteServiceProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     protected function mapWebRoutes()
53 53
     {
54 54
         Route::middleware('web')
55
-             ->namespace($this->namespace)
56
-             ->group(base_path('routes/web.php'));
55
+                ->namespace($this->namespace)
56
+                ->group(base_path('routes/web.php'));
57 57
     }
58 58
 
59 59
     /**
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     protected function mapApiRoutes()
67 67
     {
68 68
         Route::prefix('api')
69
-             ->middleware('api')
70
-             ->namespace($this->namespace)
71
-             ->group(base_path('routes/api.php'));
69
+                ->middleware('api')
70
+                ->namespace($this->namespace)
71
+                ->group(base_path('routes/api.php'));
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -44,14 +44,14 @@
 block discarded – undo
44 44
      * @param  \Exception  $exception
45 45
      * @return \Illuminate\Http\Response
46 46
      */
47
-     public function render($request, Exception $e)
48
-     {
49
-     	if ($e instanceof Tymon\JWTAuth\Exceptions\TokenExpiredException) {
50
-     		return response()->json(['token_expired'], $e->getStatusCode());
51
-     	} else if ($e instanceof Tymon\JWTAuth\Exceptions\TokenInvalidException) {
52
-     		return response()->json(['token_invalid'], $e->getStatusCode());
53
-     	}
47
+        public function render($request, Exception $e)
48
+        {
49
+            if ($e instanceof Tymon\JWTAuth\Exceptions\TokenExpiredException) {
50
+                return response()->json(['token_expired'], $e->getStatusCode());
51
+            } else if ($e instanceof Tymon\JWTAuth\Exceptions\TokenInvalidException) {
52
+                return response()->json(['token_invalid'], $e->getStatusCode());
53
+            }
54 54
 
55
-     	return parent::render($request, $e);
56
-     }
55
+            return parent::render($request, $e);
56
+        }
57 57
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@
 block discarded – undo
47 47
      public function render($request, Exception $e)
48 48
      {
49 49
      	if ($e instanceof Tymon\JWTAuth\Exceptions\TokenExpiredException) {
50
-     		return response()->json(['token_expired'], $e->getStatusCode());
50
+     		return response()->json([ 'token_expired' ], $e->getStatusCode());
51 51
      	} else if ($e instanceof Tymon\JWTAuth\Exceptions\TokenInvalidException) {
52
-     		return response()->json(['token_invalid'], $e->getStatusCode());
52
+     		return response()->json([ 'token_invalid' ], $e->getStatusCode());
53 53
      	}
54 54
 
55 55
      	return parent::render($request, $e);
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/AuthController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@
 block discarded – undo
17 17
         ];
18 18
 
19 19
         try {
20
-            if (! $token = JWTAuth::attempt($credentials)) {
21
-                return response()->json(['error' => 'invalid_credentials'], 401);
20
+            if (!$token = JWTAuth::attempt($credentials)) {
21
+                return response()->json([ 'error' => 'invalid_credentials' ], 401);
22 22
             }
23 23
         } catch (JWTException $e) {
24
-            return response()->json(['error' => 'could_not_create_token'], 500);
24
+            return response()->json([ 'error' => 'could_not_create_token' ], 500);
25 25
         }
26 26
 
27 27
         return response()->json(compact('token'));
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/RegisterController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,9 +64,9 @@
 block discarded – undo
64 64
     protected function create(array $data)
65 65
     {
66 66
         return User::create([
67
-            'name' => $data['name'],
68
-            'email' => $data['email'],
69
-            'password' => Hash::make($data['password']),
67
+            'name' => $data[ 'name' ],
68
+            'email' => $data[ 'email' ],
69
+            'password' => Hash::make($data[ 'password' ]),
70 70
         ]);
71 71
     }
72 72
 }
Please login to merge, or discard this patch.