Total Complexity | 8 |
Total Lines | 89 |
Duplicated Lines | 0 % |
Coverage | 57.89% |
Changes | 0 |
1 | <?php |
||
13 | trait HasAddress |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | * @ORM\Column(type="string", options={"default" = ""}) |
||
18 | */ |
||
19 | private $street = ''; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | * @ORM\Column(type="string", length=20, options={"default" = ""}) |
||
24 | */ |
||
25 | private $postcode = ''; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | * @ORM\Column(type="string", length=255, options={"default" = ""}) |
||
30 | */ |
||
31 | private $locality = ''; |
||
32 | |||
33 | /** |
||
34 | * @var Country |
||
35 | * @ORM\ManyToOne(targetEntity="Country") |
||
36 | * @ORM\JoinColumn(nullable=true, onDelete="SET NULL") |
||
37 | */ |
||
38 | private $country; |
||
39 | |||
40 | /** |
||
41 | * @return string |
||
42 | */ |
||
43 | public function getStreet(): string |
||
44 | { |
||
45 | return $this->street; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @param string $street |
||
50 | */ |
||
51 | 1 | public function setStreet(string $street): void |
|
52 | { |
||
53 | 1 | $this->street = $street; |
|
54 | 1 | } |
|
55 | |||
56 | /** |
||
57 | * @return string |
||
58 | */ |
||
59 | public function getPostcode(): string |
||
60 | { |
||
61 | return $this->postcode; |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @param string $postcode |
||
66 | */ |
||
67 | 1 | public function setPostcode(string $postcode): void |
|
68 | { |
||
69 | 1 | $this->postcode = $postcode; |
|
70 | 1 | } |
|
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | public function getLocality(): string |
||
76 | { |
||
77 | return $this->locality; |
||
78 | } |
||
79 | |||
80 | /** |
||
81 | * @param string $locality |
||
82 | */ |
||
83 | 1 | public function setLocality(string $locality): void |
|
84 | { |
||
85 | 1 | $this->locality = $locality; |
|
86 | 1 | } |
|
87 | |||
88 | /** |
||
89 | * @return null|Country |
||
90 | */ |
||
91 | public function getCountry(): ?Country |
||
94 | } |
||
95 | |||
96 | /** |
||
97 | * @param null|Country $country |
||
98 | */ |
||
99 | 1 | public function setCountry(?Country $country = null): void |
|
100 | { |
||
104 |