Passed
Pull Request — main (#10)
by Chema
02:14
created

FakeHttpApi   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 9
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A postRequestInvoice() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpLightningTest\Feature\Fake;
6
7
use PhpLightning\Invoice\Domain\Http\HttpApiInterface;
8
9
final class FakeHttpApi implements HttpApiInterface
10
{
11
    public function postRequestInvoice(string $uri, string $body, array $headers = []): ?array
12
    {
13
        return [
14
            'payment_hash' => 'fake payment_hash',
15
            'payment_request' => 'lnbc10u1pjzh489...fake payment_request',
16
            'checking_id' => 'fake checking_id',
17
            'lnurl_response' => 'fake lnurl_response',
18
        ];
19
    }
20
}
21