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

@@ -88,7 +88,7 @@ class LoadReports extends AbstractFixture implements ContainerAwareInterface, Or
$report = (new Report())
->setPerson($person)
->setCFGroup(
mt_rand(0, 10) > 5 ?
random_int(0, 10) > 5 ?
$this->getReference('cf_group_report_logement') :
$this->getReference('cf_group_report_education')
)
@@ -111,7 +111,7 @@ class LoadReports extends AbstractFixture implements ContainerAwareInterface, Or
//set date. 30% of the dates are 2015-05-01
$expectedDate = new DateTime('2015-01-05');
if (mt_rand(0, 100) < 30) {
if (random_int(0, 100) < 30) {
$report->setDate($expectedDate);
} else {
$report->setDate($this->faker->dateTimeBetween('-1 year', 'now')
@@ -155,7 +155,7 @@ class LoadReports extends AbstractFixture implements ContainerAwareInterface, Or
$selectedPeople = [];
foreach ($people as $person) {
if (mt_rand(0, 100) < $percentage) {
if (random_int(0, 100) < $percentage) {
$selectedPeople[] = $person;
}
}
@@ -183,7 +183,7 @@ class LoadReports extends AbstractFixture implements ContainerAwareInterface, Or
$picked = [];
if ($multiple) {
$numberSelected = mt_rand(1, count($choices) - 1);
$numberSelected = random_int(1, count($choices) - 1);
for ($i = 0; $i < $numberSelected; ++$i) {
$picked[] = $this->pickChoice($choices);