mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
address: handle cases when null street and streetnumber are given
This commit is contained in:
@@ -480,8 +480,11 @@ class Address
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setStreet(string $street): self
|
||||
public function setStreet(?string $street): self
|
||||
{
|
||||
if (null === $street) {
|
||||
$street = '';
|
||||
}
|
||||
$this->street = $street;
|
||||
|
||||
return $this;
|
||||
@@ -515,8 +518,11 @@ class Address
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setStreetNumber(string $streetNumber): self
|
||||
public function setStreetNumber(?string $streetNumber): self
|
||||
{
|
||||
if (null === $streetNumber) {
|
||||
$streetNumber = '';
|
||||
}
|
||||
$this->streetNumber = $streetNumber;
|
||||
|
||||
return $this;
|
||||
|
Reference in New Issue
Block a user