Passed
Push — main ( cf3344...756af1 )
by Chema
56s queued 13s
created

BackendInvoiceResponse   A

Complexity

Total Complexity 12

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 25
c 1
b 0
f 0
dl 0
loc 73
ccs 15
cts 30
cp 0.5
rs 10
wmc 12

12 Methods

Rating   Name   Duplication   Size   Complexity  
A isDisposable() 0 3 1
A setDisposable() 0 4 1
A setPaymentRequest() 0 4 1
A getStatus() 0 3 1
A getReason() 0 3 1
A getSuccessAction() 0 3 1
A setStatus() 0 4 1
A getPaymentRequest() 0 3 1
A setRoutes() 0 4 1
A getRoutes() 0 3 1
A setReason() 0 4 1
A setSuccessAction() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpLightning\Shared\Transfer;
6
7
final class BackendInvoiceResponse
8
{
9
    private string $status = 'OK';
10
    private string $paymentRequest = '';
11
    private array $successAction = [];
12
    private array $routes = [];
13
    private bool $disposable = false;
14
    private string $reason = '';
15
16 3
    public function getPaymentRequest(): string
17
    {
18 3
        return $this->paymentRequest;
19
    }
20
21 5
    public function setPaymentRequest(string $paymentRequest): self
22
    {
23 5
        $this->paymentRequest = $paymentRequest;
24 5
        return $this;
25
    }
26
27 3
    public function getStatus(): string
28
    {
29 3
        return $this->status;
30
    }
31
32 4
    public function setStatus(string $status): self
33
    {
34 4
        $this->status = $status;
35 4
        return $this;
36
    }
37
38
    public function getSuccessAction(): array
39
    {
40
        return $this->successAction;
41
    }
42
43
    public function setSuccessAction(array $successAction): self
44
    {
45
        $this->successAction = $successAction;
46
        return $this;
47
    }
48
49
    public function getRoutes(): array
50
    {
51
        return $this->routes;
52
    }
53
54
    public function setRoutes(array $routes): self
55
    {
56
        $this->routes = $routes;
57
        return $this;
58
    }
59
60
    public function isDisposable(): bool
61
    {
62
        return $this->disposable;
63
    }
64
65
    public function setDisposable(bool $disposable): self
66
    {
67
        $this->disposable = $disposable;
68
        return $this;
69
    }
70
71 3
    public function getReason(): string
72
    {
73 3
        return $this->reason;
74
    }
75
76 1
    public function setReason(string $reason): self
77
    {
78 1
        $this->reason = $reason;
79 1
        return $this;
80
    }
81
}
82