Completed
Push — master ( aabf4d...606f02 )
by Frederik
9s
created

Address   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 75%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 2
cbo 0
dl 0
loc 60
ccs 12
cts 16
cp 0.75
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getCountry() 0 4 1
A setCountry() 0 6 1
A getAddressLines() 0 4 1
A setAddressLines() 0 6 1
A addAddressLine() 0 6 1
1
<?php
2
3
namespace Genkgo\Camt\Camt053\DTO;
4
5
/**
6
 * Class Address
7
 * @package Genkgo\Camt\Camt053
8
 */
9
class Address
10
{
11
    /**
12
     * @var string
13
     */
14
    private $country;
15
    /**
16
     * @var array
17
     */
18
    private $addressLines = [];
19
20
    /**
21
     * @return string
22
     */
23 2
    public function getCountry()
24
    {
25 2
        return $this->country;
26
    }
27
28
    /**
29
     * @param string $country
30
     * @return static
31
     */
32 8
    public function setCountry($country)
33
    {
34 8
        $cloned = clone $this;
35 8
        $cloned->country = $country;
36 8
        return $cloned;
37
    }
38
39
    /**
40
     * @return array
41
     */
42 1
    public function getAddressLines()
43
    {
44 1
        return $this->addressLines;
45
    }
46
47
    /**
48
     * @param array $addressLines
49
     * @return static
50
     */
51
    public function setAddressLines(array $addressLines)
52
    {
53
        $cloned = clone $this;
54
        $cloned->addressLines = $addressLines;
55
        return $cloned;
56
    }
57
58
    /**
59
     * @param string $addressLine
60
     * @return static
61
     */
62 1
    public function addAddressLine($addressLine)
63
    {
64 1
        $cloned = clone $this;
65 1
        $cloned->addressLines[] = $addressLine;
66 1
        return $cloned;
67
    }
68
}
69