Conditions | 3 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
51 | public function withValidator($validator) |
||
52 | { |
||
53 | $validator->after(function ($validator) { |
||
54 | $data = $this->all(); |
||
55 | $password = $data['password'] ?? null; |
||
56 | |||
57 | if ($password && $password !== $data['password_confirmation']) { |
||
58 | $validator->errors()->add('password', trans('validation.confirmed', ['attribute' => 'password'])); |
||
59 | } |
||
60 | }); |
||
61 | } |
||
62 | |||
73 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.