Completed
Push — master ( 6d5219...5545fd )
by Sergi Tur
127:45 queued 97:43
created
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.
src/stubs/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      * @var array
16 16
      */
17 17
     protected $fillable = [
18
-        'name', 'email', 'password','username'
18
+        'name', 'email', 'password', 'username'
19 19
     ];
20 20
 
21 21
     /**
Please login to merge, or discard this patch.