DX: apply rector rulesset up to PHP72

This commit is contained in:
2023-03-29 22:32:52 +02:00
parent 64b8ae3df1
commit b9a7530f7a
110 changed files with 194 additions and 229 deletions

View File

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