Add second parameter to add-, get-, hasReference() methods in fixture classes

This commit is contained in:
2024-11-28 12:44:14 +01:00
parent 0ac49d1fde
commit 19e6ceba28
27 changed files with 61 additions and 59 deletions

View File

@@ -69,7 +69,8 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt
$ar->setStreetNumber((string) random_int(0, 199));
$ar->setPoint($this->getRandomPoint());
$ar->setPostcode($this->getReference(
LoadPostalCodes::$refs[array_rand(LoadPostalCodes::$refs)]
LoadPostalCodes::$refs[array_rand(LoadPostalCodes::$refs)],
null
));
$ar->setMunicipalityCode($ar->getPostcode()->getCode());