Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | final class Lightning |
||
12 | { |
||
13 | public const CONFIG_FILE = 'lightning-config.php'; |
||
14 | |||
15 | private const CONFIG_LOCAL_FILE = 'lightning-config-local.php'; |
||
16 | |||
17 | 1 | public static function getCallbackUrl(): string |
|
18 | { |
||
19 | 1 | $invoice = (new InvoiceFacade())->getCallbackUrl(); |
|
20 | |||
21 | 1 | return json_encode($invoice, JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT); |
|
22 | } |
||
23 | |||
24 | 1 | public static function generateInvoice(int $amount, string $backend = 'lnbits'): string |
|
29 | } |
||
30 | |||
31 | /** |
||
32 | * @codeCoverageIgnore |
||
33 | * |
||
34 | * @return Closure(GacelaConfig):void |
||
35 | */ |
||
36 | public static function configFn(): Closure |
||
45 |