| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function getUserEntityByUserCredentials( |
||
| 14 | $email, |
||
| 15 | $password, |
||
| 16 | $grantType, |
||
| 17 | ClientEntityInterface $client |
||
| 18 | ) |
||
| 19 | { |
||
| 20 | $user = $this->findOneBy(['email' => $email]); |
||
| 21 | if ($user) { |
||
| 22 | /** @var Client $client */ |
||
| 23 | // $client->ge |
||
| 24 | return $user; |
||
| 25 | /** @todo check password client and granttype */ |
||
| 26 | } |
||
| 27 | return false; |
||
|
|
|||
| 28 | } |
||
| 58 | } |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: