| Total Complexity | 3 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class Adapter implements AdapterInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private $token; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Prepare the headers for successive implementations |
||
| 22 | * |
||
| 23 | * @return array |
||
| 24 | */ |
||
| 25 | 1 | public function getHeaders(): array |
|
| 26 | { |
||
| 27 | $headers = [ |
||
| 28 | 1 | 'Authorization: Bearer '.$this->getToken(), |
|
| 29 | 1 | 'Accept' => 'application/json', |
|
| 30 | 1 | 'Content-Type' => 'application/json' |
|
| 31 | ]; |
||
| 32 | 1 | return $headers; |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Set the token |
||
| 37 | * |
||
| 38 | * @param string |
||
| 39 | */ |
||
| 40 | 1 | public function setToken(string $token) |
|
| 43 | 1 | } |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | 1 | private function getToken() |
|
| 51 | } |
||
| 52 | } |
||
| 53 |