Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class LnBitsBackendConfig implements BackendConfigInterface |
||
8 | { |
||
9 | private string $apiEndpoint = 'http://localhost:5000'; |
||
10 | private string $apiKey = ''; |
||
11 | |||
12 | 1 | public function setApiEndpoint(string $apiEndpoint): self |
|
13 | { |
||
14 | 1 | $this->apiEndpoint = rtrim($apiEndpoint, '/'); |
|
15 | 1 | return $this; |
|
16 | } |
||
17 | |||
18 | 1 | public function setApiKey(string $apiKey): self |
|
22 | } |
||
23 | |||
24 | /** |
||
25 | * @return array{ |
||
|
|||
26 | * api_endpoint: string, |
||
27 | * api_key: string |
||
28 | * } |
||
29 | */ |
||
30 | 1 | public function jsonSerialize(): array |
|
38 |