Passed
Pull Request — main (#11)
by Jesús
02:37
created

InvoiceFacade   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 14
ccs 8
cts 8
cp 1
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCallbackUrl() 0 5 1
A generateInvoice() 0 5 1
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 1
    public function generateInvoice(int $milliSats, string $backend): array
22
    {
23 1
        return $this->getFactory()
24 1
            ->createInvoiceGenerator($backend)
25 1
            ->generateInvoice($milliSats);
26
    }
27
}
28