Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 5 | ||
Bugs | 2 | Features | 0 |
1 | <?php |
||
36 | 3 | public function update(EmployeeRequest $request) |
|
37 | { |
||
38 | 3 | $employee = \Auth::user(); |
|
39 | 3 | $input = $request->only(['name', 'password']); |
|
40 | //TODO authorize??? |
||
41 | 3 | if (isset($input['password'])) |
|
42 | 3 | $input['password'] = bcrypt($input['password']); |
|
43 | 3 | $employee->update($input); |
|
44 | 3 | return $employee; |
|
45 | } |
||
46 | } |
||
47 |