InvoiceFacade   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 24
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
13
{
14 1
    /**
15
     * @return array{
0 ignored issues
show
Documentation Bug introduced by
The doc comment array{ at position 2 could not be parsed: the token is null at position 2.
Loading history...
16 1
     *     callback: string,
17 1
     *     maxSendable: int,
18 1
     *     minSendable: int,
19
     *     metadata: string,
20
     *     tag: string,
21 1
     *     commentAllowed: bool,
22
     * }
23 1
     */
24 1
    public function getCallbackUrl(string $username): array
25 1
    {
26
        return $this->getFactory()
27
            ->createCallbackUrl($username)
28
            ->getCallbackUrl($username);
29
    }
30
31
    public function generateInvoice(string $username, int $milliSats): array
32
    {
33
        return $this->getFactory()
34
            ->createInvoiceGenerator($username)
35
            ->generateInvoice($milliSats);
36
    }
37
}
38