| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Arcanesoft\Auth\Validators; |
||
| 27 | public function validateUserPassword($attribute, $value, $parameters, $validator) |
||
| 28 | { |
||
| 29 | unset($attribute, $parameters, $validator); |
||
| 30 | |||
| 31 | if (auth()->guest()) { |
||
| 32 | return false; |
||
| 33 | } |
||
| 34 | |||
| 35 | return Hash::check($value, auth()->user()->password); |
||
|
|
|||
| 36 | } |
||
| 37 | } |
||
| 38 |
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: