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