mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
[WIP] add fixtures for household address
This commit is contained in:
@@ -88,17 +88,8 @@ class LoadThirdParty extends Fixture Implements DependentFixtureInterface
|
||||
private function getPostalCode(): PostalCode
|
||||
{
|
||||
$ref = LoadPostalCodes::$refs[\array_rand(LoadPostalCodes::$refs)];
|
||||
|
||||
return $this->getReference($ref);
|
||||
if (count($this->postalCodesIds) === 0) {
|
||||
// fill the postal codes
|
||||
$this->em->createQuery('SELECT p.id FROM '.PostalCode::class)
|
||||
->getScalarResult();
|
||||
}
|
||||
|
||||
$id = $this->postalCodesIds[\array_rand($this->postalCodesIds)];
|
||||
|
||||
return $this->em->getRepository(PostalCode::class)
|
||||
->find($id);
|
||||
}
|
||||
|
||||
private function createAddress(): ObjectSet
|
||||
|
Reference in New Issue
Block a user