| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function secureRequest(Request $request, RequestBuilder $builder) |
||
| 19 | { |
||
| 20 | $credentials = $builder->getCredentials(); |
||
| 21 | |||
| 22 | if (!isset($credentials['username']) || !isset($credentials['password'])) { |
||
| 23 | throw new \RuntimeException( |
||
| 24 | 'You must specified a "username" and a "password" for the http basic authentication.' |
||
| 25 | ); |
||
| 26 | } |
||
| 27 | |||
| 28 | $request->setAuth($credentials['username'], $credentials['password']); |
||
| 29 | } |
||
| 31 |