mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Fixtures/fix loading people
This commit is contained in:
@@ -33,7 +33,7 @@ class LoadHousehold extends Fixture implements DependentFixtureInterface
|
||||
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
// generate two times the participation. This will lead to
|
||||
// generate two times the participation. This will lead to
|
||||
// some movement in participation (same people in two differents
|
||||
// households)
|
||||
|
||||
@@ -110,7 +110,7 @@ class LoadHousehold extends Fixture implements DependentFixtureInterface
|
||||
$i = 0;
|
||||
while ($i < $nb) {
|
||||
$address = $this->createAddress();
|
||||
$address->setValidFrom(\DateTime::createFromImmutable($date));
|
||||
$address->setValidFrom(\DateTime::createFromImmutable($date));
|
||||
|
||||
if (\random_int(0, 20) < 1) {
|
||||
$date = $date->add(new \DateInterval('P'.\random_int(8, 52).'W'));
|
||||
@@ -157,6 +157,7 @@ class LoadHousehold extends Fixture implements DependentFixtureInterface
|
||||
->setParameter('center', 'Center A')
|
||||
->getScalarResult()
|
||||
;
|
||||
|
||||
\shuffle($this->personIds);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user