mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
fix fixture for address reference
This commit is contained in:
parent
a1895ec65f
commit
17c01d9b46
@ -38,7 +38,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getOrder() {
|
public function getOrder() {
|
||||||
return 30;
|
return 51;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -73,8 +73,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt
|
|||||||
LoadPostalCodes::$refs[array_rand(LoadPostalCodes::$refs)]
|
LoadPostalCodes::$refs[array_rand(LoadPostalCodes::$refs)]
|
||||||
));
|
));
|
||||||
|
|
||||||
$ar->setMunicipalityCode($ar->getPostcode());
|
$ar->setMunicipalityCode($ar->getPostcode()->getCode());
|
||||||
dump($ar);
|
|
||||||
|
|
||||||
return $ar
|
return $ar
|
||||||
;
|
;
|
||||||
|
@ -103,18 +103,30 @@ class AddressReference
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPostcode(): ?string
|
/**
|
||||||
{
|
* Set postcode
|
||||||
return $this->postcode;
|
*
|
||||||
}
|
* @param PostalCode $postcode
|
||||||
|
*
|
||||||
public function setPostcode(?string $postcode): self
|
* @return Address
|
||||||
|
*/
|
||||||
|
public function setPostcode(PostalCode $postcode = null)
|
||||||
{
|
{
|
||||||
$this->postcode = $postcode;
|
$this->postcode = $postcode;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get postcode
|
||||||
|
*
|
||||||
|
* @return PostalCode
|
||||||
|
*/
|
||||||
|
public function getPostcode()
|
||||||
|
{
|
||||||
|
return $this->postcode;
|
||||||
|
}
|
||||||
|
|
||||||
public function getMunicipalityCode(): ?string
|
public function getMunicipalityCode(): ?string
|
||||||
{
|
{
|
||||||
return $this->municipalityCode;
|
return $this->municipalityCode;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user