Completed
Pull Request — master (#5)
by claudio
11:05 queued 03:52
created
app/Planner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      */
62 62
     public function verifyEmployee(Employee $employee)
63 63
     {
64
-        $group = $this->groupsManaged()->whereHas('employees',function ($query) use ($employee) {$query->where('employees.id', $employee->id);})->first();
64
+        $group = $this->groupsManaged()->whereHas('employees', function($query) use ($employee) {$query->where('employees.id', $employee->id); })->first();
65 65
 
66 66
         return (is_object($group) && $group->exists);
67 67
     }
Please login to merge, or discard this patch.
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.