Completed
Push — master ( 7ec104...6d5219 )
by Sergi Tur
98:33 queued 68:39
created
src/stubs/ForgotPasswordController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
      * Get the response for a failed password reset link.
66 66
      *
67 67
      * @param Request $request
68
-     * @param $response
68
+     * @param string $response
69 69
      * @return mixed
70 70
      */
71 71
     protected function sendResetLinkFailedResponse(Request $request, $response)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
             ], 422);
80 80
         }
81 81
         return back()->withErrors(
82
-            ['email' => trans($response)]
82
+            [ 'email' => trans($response) ]
83 83
         );
84 84
     }
85 85
 
Please login to merge, or discard this patch.
src/stubs/HomeController.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -7,9 +7,6 @@
 block discarded – undo
7 7
 
8 8
 namespace App\Http\Controllers;
9 9
 
10
-use App\Http\Requests;
11
-use Illuminate\Http\Request;
12
-
13 10
 /**
14 11
  * Class HomeController
15 12
  * @package App\Http\Controllers
Please login to merge, or discard this patch.
src/stubs/RegisterController.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace App\Http\Controllers\Auth;
4 4
 
5
-use App\User;
6
-use Validator;
7 5
 use App\Http\Controllers\Controller;
6
+use App\User;
8 7
 use Illuminate\Foundation\Auth\RegistersUsers;
8
+use Validator;
9 9
 
10 10
 /**
11 11
  * Class RegisterController
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -79,12 +79,12 @@
 block discarded – undo
79 79
     protected function create(array $data)
80 80
     {
81 81
         $fields = [
82
-            'name'     => $data['name'],
83
-            'email'    => $data['email'],
84
-            'password' => bcrypt($data['password']),
82
+            'name'     => $data[ 'name' ],
83
+            'email'    => $data[ 'email' ],
84
+            'password' => bcrypt($data[ 'password' ]),
85 85
         ];
86
-        if (config('auth.providers.users.field','email') === 'username' && isset($data['username'])) {
87
-            $fields['username'] = $data['username'];
86
+        if (config('auth.providers.users.field', 'email') === 'username' && isset($data[ 'username' ])) {
87
+            $fields[ 'username' ] = $data[ 'username' ];
88 88
         }
89 89
         return User::create($fields);
90 90
     }
Please login to merge, or discard this patch.
src/stubs/ResetPasswordController.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
4 4
 
5 5
 use App\Http\Controllers\Controller;
6 6
 use Illuminate\Foundation\Auth\ResetsPasswords;
7
+use Illuminate\Http\JsonResponse;
7 8
 use Illuminate\Http\Request;
8 9
 use Illuminate\Support\Facades\Password;
9
-use Illuminate\Http\JsonResponse;
10 10
 
11 11
 class ResetPasswordController extends Controller
12 12
 {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         // will update the password on an actual user model and persist it to the
38 38
         // database. Otherwise we will parse the error and return the response.
39 39
         $response = $this->broker()->reset(
40
-            $this->credentials($request), function ($user, $password) {
40
+            $this->credentials($request), function($user, $password) {
41 41
             $this->resetPassword($user, $password);
42 42
         }
43 43
         );
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @param  string  $response
58 58
      * @return \Illuminate\Http\RedirectResponse
59 59
      */
60
-    protected function sendResetResponse(Request $request,$response)
60
+    protected function sendResetResponse(Request $request, $response)
61 61
     {
62 62
         if ($request->expectsJson()) {
63 63
             return response()->json([
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
     protected function sendResetFailedResponse(Request $request, $response)
79 79
     {
80 80
         if ($request->expectsJson()) {
81
-            return new JsonResponse(['email' => trans($response) ], 422);
81
+            return new JsonResponse([ 'email' => trans($response) ], 422);
82 82
         }
83 83
         return redirect()->back()
84 84
             ->withInput($request->only('email'))
85
-            ->withErrors(['email' => trans($response)]);
85
+            ->withErrors([ 'email' => trans($response) ]);
86 86
     }
87 87
 
88 88
     /**
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     public function showResetForm(Request $request, $token = null)
98 98
     {
99 99
         return view('adminlte::auth.passwords.reset')->with(
100
-            ['token' => $token, 'email' => $request->email]
100
+            [ 'token' => $token, 'email' => $request->email ]
101 101
         );
102 102
     }
103 103
 
Please login to merge, or discard this patch.
src/stubs/LoginController.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function __construct()
49 49
     {
50
-        $this->middleware('guest', ['except' => 'logout']);
50
+        $this->middleware('guest', [ 'except' => 'logout' ]);
51 51
     }
52 52
 
53 53
     /**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function username()
59 59
     {
60
-        return config('auth.providers.users.field','email');
60
+        return config('auth.providers.users.field', 'email');
61 61
     }
62 62
 
63 63
     /**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     protected function attemptLogin(Request $request)
70 70
     {
71 71
         if ($this->username() === 'email') return $this->attemptLoginAtAuthenticatesUsers($request);
72
-        if ( ! $this->attemptLoginAtAuthenticatesUsers($request)) {
72
+        if (!$this->attemptLoginAtAuthenticatesUsers($request)) {
73 73
             return $this->attempLoginUsingUsernameAsAnEmail($request);
74 74
         }
75 75
         return false;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     protected function attempLoginUsingUsernameAsAnEmail(Request $request)
85 85
     {
86 86
         return $this->guard()->attempt(
87
-            ['email' => $request->input('username'), 'password' => $request->input('password')],
87
+            [ 'email' => $request->input('username'), 'password' => $request->input('password') ],
88 88
             $request->has('remember'));
89 89
     }
90 90
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,9 @@
 block discarded – undo
68 68
      */
69 69
     protected function attemptLogin(Request $request)
70 70
     {
71
-        if ($this->username() === 'email') return $this->attemptLoginAtAuthenticatesUsers($request);
71
+        if ($this->username() === 'email') {
72
+            return $this->attemptLoginAtAuthenticatesUsers($request);
73
+        }
72 74
         if ( ! $this->attemptLoginAtAuthenticatesUsers($request)) {
73 75
             return $this->attempLoginUsingUsernameAsAnEmail($request);
74 76
         }
Please login to merge, or discard this patch.