| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 69 | public function addAuthentication() |
||
| 70 | { |
||
| 71 | if ($this->access_token == null) { |
||
| 72 | throw new RequestException('Property access_token should be set.'); |
||
| 73 | } |
||
| 74 | |||
| 75 | $headers = $this->decoratedRequest->getHeaders(); |
||
| 76 | $headers['Authorization'] = sprintf('%s %s', 'OAuth2', $this->access_token); |
||
| 77 | $this->decoratedRequest->setHeaders($headers); |
||
| 78 | |||
| 79 | return $this; |
||
| 80 | } |
||
| 81 | } |
||
| 82 |