Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function getUserEntityByUserCredentials( |
||
20 | $username, |
||
21 | $password, |
||
22 | $grantType, |
||
23 | ClientEntityInterface $clientEntity |
||
24 | ) { |
||
25 | $member = Member::get()->filter(['Email' => $username])->first(); |
||
26 | |||
27 | /** |
||
28 | * @var ValidationResult $result |
||
29 | */ |
||
30 | $result = Injector::inst()->get(MemberAuthenticator::class)->checkPassword($member, $password); |
||
31 | |||
32 | return $result->isValid() ? new UserEntity($member) : null; |
||
|
|||
33 | } |
||
34 | } |
||
35 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: