Completed
Push — master ( 76c2d8...2f5dd4 )
by claudio
10:48
created
app/Http/Controllers/Companies/Auth/AuthController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      * cn = company normal
41 41
      * @var array
42 42
      */
43
-    protected $custom = ['mode' => 'cn'];
43
+    protected $custom = [ 'mode' => 'cn' ];
44 44
 
45 45
     /**
46 46
      * Create a new authentication controller instance.
@@ -48,20 +48,20 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function __construct()
50 50
     {
51
-        config(['auth.model' => \plunner\Company::class]);
52
-        config(['jwt.user' => \plunner\Company::class]);
51
+        config([ 'auth.model' => \plunner\Company::class ]);
52
+        config([ 'jwt.user' => \plunner\Company::class ]);
53 53
     }
54 54
 
55 55
     public function postLogin(Request $request)
56 56
     {
57 57
         //remember me
58
-        $this->validate($request, ['remember' => 'required|boolean']);
59
-        $this->validate($request, ['token' => 'sometimes|required|max:255']);
58
+        $this->validate($request, [ 'remember' => 'required|boolean' ]);
59
+        $this->validate($request, [ 'token' => 'sometimes|required|max:255' ]);
60 60
         if ($request->input('remember', false)) {
61
-            config(['jwt.ttl' => '43200']); //30 days
62
-            $this->custom = array_merge($this->custom, ['remember' => 'true']);
61
+            config([ 'jwt.ttl' => '43200' ]); //30 days
62
+            $this->custom = array_merge($this->custom, [ 'remember' => 'true' ]);
63 63
         } else
64
-            $this->custom = array_merge($this->custom, ['remember' => 'false']);
64
+            $this->custom = array_merge($this->custom, [ 'remember' => 'false' ]);
65 65
         return $this->postLoginOriginal($request);
66 66
     }
67 67
 
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
     protected function create(array $data)
90 90
     {
91 91
         return Company::create([
92
-            'name' => $data['name'],
93
-            'email' => $data['email'],
94
-            'password' => bcrypt($data['password']),
92
+            'name' => $data[ 'name' ],
93
+            'email' => $data[ 'email' ],
94
+            'password' => bcrypt($data[ 'password' ]),
95 95
         ]);
96 96
     }
97 97
 
Please login to merge, or discard this patch.