Passed
Push — master ( 45011d...825113 )
by Adrien
02:28
created

RelatedParty::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Genkgo\Camt\DTO;
4
5
/**
6
 * Class RelatedParty
7
 *
8
 * @package Genkgo\Camt\DTO
9
 */
10
class RelatedParty
11
{
12
    /**
13
     * @var RelatedPartyTypeInterface
14
     */
15
    private $relatedPartyDetails;
16
17
    /**
18
     * @var null|Account
19
     */
20
    private $account;
21
22
    /**
23
     * @param RelatedPartyTypeInterface $relatedPartyDetails
24
     * @param null|Account $account
25
     */
26 23
    public function __construct(RelatedPartyTypeInterface $relatedPartyDetails, ?Account $account)
27
    {
28 23
        $this->relatedPartyDetails = $relatedPartyDetails;
29 23
        $this->account = $account;
30 23
    }
31
32
    /**
33
     * @return RelatedPartyTypeInterface
34
     */
35 3
    public function getRelatedPartyType()
36
    {
37 3
        return $this->relatedPartyDetails;
38
    }
39
40
    /**
41
     * @return null|Account
42
     */
43 3
    public function getAccount(): ?Account
44
    {
45 3
        return $this->account;
46
    }
47
}
48