mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
Add second parameter to add-, get-, hasReference() methods in fixture classes
This commit is contained in:
@@ -70,10 +70,10 @@ class LoadThirdParty extends Fixture implements DependentFixtureInterface
|
||||
$number = random_int(1, \count($references));
|
||||
|
||||
if (1 === $number) {
|
||||
yield $this->getReference($references[array_rand($references)]);
|
||||
yield $this->getReference($references[array_rand($references)], null);
|
||||
} else {
|
||||
foreach (array_rand($references, $number) as $index) {
|
||||
yield $this->getReference($references[$index]);
|
||||
yield $this->getReference($references[$index], null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,7 +82,7 @@ class LoadThirdParty extends Fixture implements DependentFixtureInterface
|
||||
{
|
||||
$ref = LoadPostalCodes::$refs[array_rand(LoadPostalCodes::$refs)];
|
||||
|
||||
return $this->getReference($ref);
|
||||
return $this->getReference($ref, null);
|
||||
}
|
||||
|
||||
private function getThirdParties(): ObjectSet
|
||||
|
Reference in New Issue
Block a user