| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 37 | protected function renderAuthorization() |
||
| 38 | { |
||
| 39 | foreach (['client_user', 'client_password'] as $key) { |
||
| 40 | $value = $this->getOptions()->get($key); |
||
| 41 | if (empty($value)) { |
||
| 42 | throw new \InvalidArgumentException('[' . $key . '] ausente!'); |
||
| 43 | } |
||
| 44 | } |
||
| 45 | |||
| 46 | return 'Authorization: Basic ' |
||
| 47 | . base64_encode($this->getOptions()->get('client_user') . ':' |
||
| 48 | . $this->getOptions()->get('client_password')); |
||
| 49 | } |
||
| 50 | |||
| 59 |