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