mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
DX: [Address] fix inconsistencies between doctrine mapping and sql schema
DX: [Address] fix inconsistencies between doctrine mapping and sql schema Fixed: Address vue module do now set empty value to empty string instead of null DX: fixed AddressReferenceBaseImporterTest
This commit is contained in:
@@ -55,13 +55,13 @@ class AddressReference
|
||||
* @ORM\Column(type="integer")
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $municipalityCode;
|
||||
private string $municipalityCode = '';
|
||||
|
||||
/**
|
||||
* A geospatial field storing the coordinates of the Address.
|
||||
@@ -71,7 +71,7 @@ class AddressReference
|
||||
* @ORM\Column(type="point")
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $point;
|
||||
private ?Point $point = null;
|
||||
|
||||
/**
|
||||
* @var PostalCode
|
||||
@@ -79,31 +79,31 @@ class AddressReference
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $postcode;
|
||||
private ?PostalCode $postcode;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $refId;
|
||||
private string $refId = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $source;
|
||||
private string $source = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $street;
|
||||
private string $street = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": ""})
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $streetNumber;
|
||||
private string $streetNumber = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true)
|
||||
@@ -126,7 +126,7 @@ class AddressReference
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getMunicipalityCode(): ?string
|
||||
public function getMunicipalityCode(): string
|
||||
{
|
||||
return $this->municipalityCode;
|
||||
}
|
||||
@@ -141,27 +141,27 @@ class AddressReference
|
||||
*
|
||||
* @return PostalCode
|
||||
*/
|
||||
public function getPostcode()
|
||||
public function getPostcode(): ?PostalCode
|
||||
{
|
||||
return $this->postcode;
|
||||
}
|
||||
|
||||
public function getRefId(): ?string
|
||||
public function getRefId(): string
|
||||
{
|
||||
return $this->refId;
|
||||
}
|
||||
|
||||
public function getSource(): ?string
|
||||
public function getSource(): string
|
||||
{
|
||||
return $this->source;
|
||||
}
|
||||
|
||||
public function getStreet(): ?string
|
||||
public function getStreet(): string
|
||||
{
|
||||
return $this->street;
|
||||
}
|
||||
|
||||
public function getStreetNumber(): ?string
|
||||
public function getStreetNumber(): string
|
||||
{
|
||||
return $this->streetNumber;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ class AddressReference
|
||||
|
||||
public function setMunicipalityCode(?string $municipalityCode): self
|
||||
{
|
||||
$this->municipalityCode = $municipalityCode;
|
||||
$this->municipalityCode = (string) $municipalityCode;
|
||||
|
||||
return $this;
|
||||
}
|
||||
@@ -227,21 +227,21 @@ class AddressReference
|
||||
|
||||
public function setSource(?string $source): self
|
||||
{
|
||||
$this->source = $source;
|
||||
$this->source = (string) $source;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setStreet(?string $street): self
|
||||
{
|
||||
$this->street = $street;
|
||||
$this->street = (string) $street;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setStreetNumber(?string $streetNumber): self
|
||||
{
|
||||
$this->streetNumber = $streetNumber;
|
||||
$this->streetNumber = (string) $streetNumber;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user