| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| 1 | <?php |
||
| 38 | 5 | public function getCredentials(ServerRequestInterface $request) |
|
| 39 | { |
||
| 40 | 5 | $body = $request->getParsedBody(); |
|
| 41 | |||
| 42 | 5 | if (empty($body[$this->identifier]) || empty($body[$this->password])) { |
|
| 43 | 4 | return null; |
|
| 44 | } |
||
| 45 | |||
| 46 | 2 | return new Credentials($body[$this->identifier], $body[$this->password]); |
|
| 47 | } |
||
| 48 | } |
||
| 49 |