Passed
Push — main ( 36fa87...8ed71a )
by Chema
01:06 queued 13s
created

InvoiceFacade::generate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpLightning\Invoice;
6
7
use Gacela\Framework\AbstractFacade;
8
9
/**
10
 * @method InvoiceFactory getFactory()
11
 */
12
final class InvoiceFacade extends AbstractFacade implements InvoiceFacadeInterface
13
{
14 2
    public function getCallbackUrl(): array
15
    {
16 2
        return $this->getFactory()
17 2
            ->createCallbackUrl()
18 2
            ->getCallbackUrl();
19
    }
20
21
    public function generateInvoice(int $milliSats, string $backend): array
22
    {
23
        return $this->getFactory()
24
            ->createInvoiceGenerator($backend)
25
            ->generateInvoice($milliSats);
26
    }
27
}
28