| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 62 | public function addAuthentication() |
||
| 63 | { |
||
| 64 | if ($this->accessToken === null) { |
||
| 65 | throw new RequestException('Property accessToken should be set.'); |
||
| 66 | } |
||
| 67 | |||
| 68 | $headers = $this->decoratedRequest->getHeaders(); |
||
| 69 | $headers['Authorization'] = sprintf('%s %s', 'OAuth2', $this->accessToken); |
||
| 70 | $this->decoratedRequest->setHeaders($headers); |
||
| 71 | |||
| 72 | return $this; |
||
| 73 | } |
||
| 74 | } |
||
| 75 |