Passed
Push — main ( 328362...5892c7 )
by Chema
02:33
created

InvoiceFacade::generateInvoice()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
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
13
{
14 1
    public function getCallbackUrl(string $username): array
15
    {
16 1
        return $this->getFactory()
17 1
            ->createCallbackUrl($username)
18 1
            ->getCallbackUrl($username);
19
    }
20
21 1
    public function generateInvoice(string $username, int $milliSats): array
22
    {
23 1
        return $this->getFactory()
24 1
            ->createInvoiceGenerator($username)
25 1
            ->generateInvoice($milliSats);
26
    }
27
}
28