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

@@ -65,15 +65,15 @@ class LoadCustomField extends AbstractFixture implements OrderedFixtureInterface
];
for ($i = 0; 25 >= $i; ++$i) {
$cFType = $cFTypes[rand(0, count($cFTypes) - 1)];
$cFType = $cFTypes[mt_rand(0, count($cFTypes) - 1)];
$customField = (new CustomField())
->setSlug("cf_report_{$i}")
->setType($cFType['type'])
->setOptions($cFType['options'])
->setName(['fr' => "CustomField {$i}"])
->setOrdering(rand(0, 1000) / 1000)
->setCustomFieldsGroup($this->getReference('cf_group_report_' . (rand(0, 3))));
->setOrdering(mt_rand(0, 1000) / 1000)
->setCustomFieldsGroup($this->getReference('cf_group_report_' . (mt_rand(0, 3))));
$manager->persist($customField);
}