Conditions | 4 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function withValidator($validator): void |
||
31 | { |
||
32 | $user = $this->user($this->route('guard')); |
||
33 | |||
34 | $validator->after(function ($validator) use ($user) { |
||
35 | if (! $user->phone || ! $user->phone_verified) { |
||
36 | $validator->errors()->add('phone', trans('cortex/auth::messages.account.'.(! $user->phone ? 'phone_field_required' : 'phone_verification_required'))); |
||
|
|||
37 | } |
||
38 | }); |
||
39 | } |
||
40 | |||
51 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.