mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-26 09:33:50 +00:00
cs: Enable risky rule random_api_migration
.
This commit is contained in:
@@ -84,7 +84,7 @@ class LoadReports extends AbstractFixture implements OrderedFixtureInterface, Co
|
||||
$report = (new Report())
|
||||
->setPerson($person)
|
||||
->setCFGroup(
|
||||
rand(0, 10) > 5 ?
|
||||
mt_rand(0, 10) > 5 ?
|
||||
$this->getReference('cf_group_report_logement') :
|
||||
$this->getReference('cf_group_report_education')
|
||||
)
|
||||
@@ -107,7 +107,7 @@ class LoadReports extends AbstractFixture implements OrderedFixtureInterface, Co
|
||||
//set date. 30% of the dates are 2015-05-01
|
||||
$expectedDate = new DateTime('2015-01-05');
|
||||
|
||||
if (rand(0, 100) < 30) {
|
||||
if (mt_rand(0, 100) < 30) {
|
||||
$report->setDate($expectedDate);
|
||||
} else {
|
||||
$report->setDate($this->faker->dateTimeBetween('-1 year', 'now')
|
||||
@@ -151,7 +151,7 @@ class LoadReports extends AbstractFixture implements OrderedFixtureInterface, Co
|
||||
$selectedPeople = [];
|
||||
|
||||
foreach ($people as $person) {
|
||||
if (rand(0, 100) < $percentage) {
|
||||
if (mt_rand(0, 100) < $percentage) {
|
||||
$selectedPeople[] = $person;
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ class LoadReports extends AbstractFixture implements OrderedFixtureInterface, Co
|
||||
$picked = [];
|
||||
|
||||
if ($multiple) {
|
||||
$numberSelected = rand(1, count($choices) - 1);
|
||||
$numberSelected = mt_rand(1, count($choices) - 1);
|
||||
|
||||
for ($i = 0; $i < $numberSelected; ++$i) {
|
||||
$picked[] = $this->pickChoice($choices);
|
||||
|
Reference in New Issue
Block a user