Completed
Push — master ( 1c251e...ad7d44 )
by claudio
05:38 queued 03:07
created
app/Http/Controllers/Companies/Employees/EmployeesController.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function __construct()
23 23
     {
24
-        config(['auth.model' => \plunner\Company::class]);
25
-        config(['jwt.user' => \plunner\Company::class]);
24
+        config([ 'auth.model' => \plunner\Company::class ]);
25
+        config([ 'jwt.user' => \plunner\Company::class ]);
26 26
         $this->middleware('jwt.authandrefresh:mode-cn');
27 27
     }
28 28
 
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
         //
54 54
         $company = \Auth::user();
55 55
         $input = $request->all();
56
-        if(isset($input['password']))
57
-            $input['password'] = bcrypt($input['password']);
56
+        if (isset($input[ 'password' ]))
57
+            $input[ 'password' ] = bcrypt($input[ 'password' ]);
58 58
         $employee = $company->employees()->create($input);
59 59
         return $employee;
60 60
     }
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
         $employee = Employee::findOrFail($id);
87 87
         $this->authorize($employee);
88 88
         $input = $request->all();
89
-        if(isset($input['password']))
90
-            $input['password'] = bcrypt($input['password']);
89
+        if (isset($input[ 'password' ]))
90
+            $input[ 'password' ] = bcrypt($input[ 'password' ]);
91 91
         $employee->update($input);
92 92
         return $employee;
93 93
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,9 @@  discard block
 block discarded – undo
53 53
         //
54 54
         $company = \Auth::user();
55 55
         $input = $request->all();
56
-        if(isset($input['password']))
57
-            $input['password'] = bcrypt($input['password']);
56
+        if(isset($input['password'])) {
57
+                    $input['password'] = bcrypt($input['password']);
58
+        }
58 59
         $employee = $company->employees()->create($input);
59 60
         return $employee;
60 61
     }
@@ -86,8 +87,9 @@  discard block
 block discarded – undo
86 87
         $employee = Employee::findOrFail($id);
87 88
         $this->authorize($employee);
88 89
         $input = $request->all();
89
-        if(isset($input['password']))
90
-            $input['password'] = bcrypt($input['password']);
90
+        if(isset($input['password'])) {
91
+                    $input['password'] = bcrypt($input['password']);
92
+        }
91 93
         $employee->update($input);
92 94
         return $employee;
93 95
     }
Please login to merge, or discard this patch.
app/Http/Middleware/VerifyCsrfToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
 
24 24
         // Don't validate CSRF when testing.
25
-        if(env('APP_ENV') === 'testing') {
25
+        if (env('APP_ENV') === 'testing') {
26 26
             return true;
27 27
         }
28 28
 
Please login to merge, or discard this patch.