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