Completed
Push — master ( f64a2b...48aedc )
by thomas
05:58
created

PaymentRequestInfo   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 39
ccs 6
cts 8
cp 0.75
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A request() 0 4 1
A pathValidation() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Bip70\Client;
6
7
use Bip70\Protobuf\Proto\PaymentRequest;
8
use X509\CertificationPath\PathValidation\PathValidationResult;
9
10
class PaymentRequestInfo
11
{
12
    /**
13
     * @var PaymentRequest
14
     */
15
    private $request;
16
17
    /**
18
     * @var null|PathValidationResult
19
     */
20
    private $validationResult;
21
22
    /**
23
     * PaymentRequestInfo constructor.
24
     * @param PaymentRequest $request
25
     * @param PathValidationResult|null $pathValidation
26
     */
27 2
    public function __construct(PaymentRequest $request, PathValidationResult $pathValidation = null)
28
    {
29 2
        $this->request = $request;
30 2
        $this->validationResult = $pathValidation;
31 2
    }
32
33
    /**
34
     * @return PaymentRequest
35
     */
36
    public function request(): PaymentRequest
37
    {
38
        return $this->request;
39
    }
40
41
    /**
42
     * @return null|PathValidationResult
43
     */
44 2
    public function pathValidation()
45
    {
46 2
        return $this->validationResult;
47
    }
48
}
49