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