| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function secureRequest(Request $request, RequestBuilder $builder) |
||
| 32 | { |
||
| 33 | $credentials = $builder->getCredentials(); |
||
| 34 | |||
| 35 | if (!isset($credentials['username']) || !isset($credentials['password'])) { |
||
| 36 | throw new \RuntimeException( |
||
| 37 | 'You must specified a "username" and a "password" for the http basic authentication.' |
||
| 38 | ); |
||
| 39 | } |
||
| 40 | |||
| 41 | $request->setAuth($credentials['username'], $credentials['password'], $this->scheme); |
||
| 42 | } |
||
| 44 |