| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 22 | public function process(Request $request, Handler $handler) : Response |
|
| 34 | { |
||
| 35 | 22 | $connection = $handler->getConnection(); |
|
| 36 | |||
| 37 | 22 | if ($this->greeting !== $greeting = $connection->open()) { |
|
| 38 | 22 | $handler->handle(new AuthenticateRequest( |
|
| 39 | 22 | $greeting->getSalt(), |
|
| 40 | 12 | $this->username, |
|
| 41 | 12 | $this->password |
|
| 42 | )); |
||
| 43 | |||
| 44 | 6 | $this->greeting = $greeting; |
|
| 45 | } |
||
| 46 | |||
| 47 | 6 | return $handler->handle($request); |
|
| 48 | } |
||
| 50 |