| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 66.67% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class HttpClientAuthorization |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $username; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $password; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * HttpClientAuthorization constructor. |
||
| 23 | * @param string $username |
||
| 24 | * @param string $password |
||
| 25 | */ |
||
| 26 | 2 | public function __construct(string $username, string $password) |
|
| 27 | { |
||
| 28 | 2 | $this->username = $username; |
|
| 29 | 2 | $this->password = $password; |
|
| 30 | 2 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * The authorization header will be generated and added as a custom header |
||
| 34 | * @return array |
||
| 35 | */ |
||
| 36 | public function getBasicAuth(): array |
||
| 40 | ]; |
||
| 41 | } |
||
| 43 |