cs: Enable risky rule random_api_migration.

This commit is contained in:
Pol Dellaiera
2021-11-30 11:55:02 +01:00
parent 91d12c4a96
commit a43784c3a1
13 changed files with 27 additions and 27 deletions

View File

@@ -121,12 +121,12 @@ class LoadCustomFields extends AbstractFixture implements
// select a set of people and add data
foreach ($personIds as $id) {
// add info on 1 person on 2
if (rand(0, 1) === 1) {
if (mt_rand(0, 1) === 1) {
/** @var Person $person */
$person = $manager->getRepository(Person::class)->find($id);
$person->setCFData([
'remarques' => $this->createCustomFieldText()
->serialize($faker->text(rand(150, 250)), $this->customFieldText),
->serialize($faker->text(mt_rand(150, 250)), $this->customFieldText),
'document-d-identite' => $this->createCustomFieldChoice()
->serialize([$choices[array_rand($choices)]], $this->customFieldChoice),
]);