| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Distilleries\Expendable\Observers; |
||
| 14 | 8 | public function updating($model) |
|
| 15 | { |
||
| 16 | 8 | $newPassword = Request::get('password'); |
|
| 17 | |||
| 18 | 8 | if (empty($newPassword)) |
|
| 19 | { |
||
| 20 | 4 | if (empty($model->password)) |
|
| 21 | { |
||
| 22 | 2 | $newPassword = $model->find($model->id)->password; |
|
| 23 | } else |
||
| 24 | { |
||
| 25 | 4 | $newPassword = $model->password; |
|
| 26 | } |
||
| 27 | |||
| 28 | } |
||
| 29 | |||
| 30 | 8 | $this->hash($model, $newPassword); |
|
| 31 | } |
||
| 47 | } |