Total Complexity | 4 |
Total Lines | 34 |
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 = $apiEndpoint; |
|
15 | 1 | return $this; |
|
16 | } |
||
17 | |||
18 | 1 | public function setApiKey(string $apiKey): self |
|
19 | { |
||
20 | 1 | $this->apiKey = $apiKey; |
|
21 | 1 | return $this; |
|
22 | } |
||
23 | |||
24 | 1 | public function getBackendName(): string |
|
25 | { |
||
26 | 1 | return 'lnbits'; |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * @return array{ |
||
|
|||
31 | * api_endpoint: string, |
||
32 | * api_key: string |
||
33 | * } |
||
34 | */ |
||
35 | 1 | public function jsonSerialize(): array |
|
41 | 1 | ]; |
|
42 | } |
||
43 | } |
||
44 |