Conditions | 2 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | public function withValidator($validator) |
||
44 | { |
||
45 | $validator->after(function ($validator) { |
||
46 | // check old password matches |
||
47 | if (!Hash::check($this->input('old_password'), Auth::user()->password)) { |
||
|
|||
48 | $validator->errors()->add('old_password', trans('backpack::base.old_password_incorrect')); |
||
49 | } |
||
50 | }); |
||
51 | } |
||
52 | } |
||
53 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: