Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | protected function prepareForValidation(): void |
||
27 | { |
||
28 | $data = $this->all(); |
||
29 | |||
30 | $guardian = $this->route('guardian') ?? app('cortex.auth.guardian'); |
||
31 | |||
32 | if ($guardian->exists && empty($data['password'])) { |
||
33 | unset($data['password'], $data['password_confirmation']); |
||
34 | } |
||
35 | |||
36 | $this->replace($data); |
||
37 | } |
||
38 | |||
57 |