mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
DX: apply rector rulesset up to PHP72
This commit is contained in:
@@ -43,7 +43,7 @@ class LoadParticipation extends AbstractFixture implements OrderedFixtureInterfa
|
||||
for ($i = 0; $i < $expectedNumber; ++$i) {
|
||||
$event = (new Event())
|
||||
->setDate($this->faker->dateTimeBetween('-2 years', '+6 months'))
|
||||
->setName($this->faker->words(mt_rand(2, 4), true))
|
||||
->setName($this->faker->words(random_int(2, 4), true))
|
||||
->setType($this->getReference(LoadEventTypes::$refs[array_rand(LoadEventTypes::$refs)]))
|
||||
->setCenter($center)
|
||||
->setCircle(
|
||||
@@ -75,7 +75,7 @@ class LoadParticipation extends AbstractFixture implements OrderedFixtureInterfa
|
||||
|
||||
/** @var \Chill\PersonBundle\Entity\Person $person */
|
||||
foreach ($people as $person) {
|
||||
$nb = mt_rand(0, 3);
|
||||
$nb = random_int(0, 3);
|
||||
|
||||
for ($i = 0; $i < $nb; ++$i) {
|
||||
$event = $events[array_rand($events)];
|
||||
|
@@ -24,7 +24,7 @@ class Configuration implements ConfigurationInterface
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder('chill_event');
|
||||
$rootNode = $treeBuilder->getRootNode('chill_event');
|
||||
$rootNode = $treeBuilder->getRootNode();
|
||||
|
||||
// Here you should define the parameters that are allowed to
|
||||
// configure your bundle. See the documentation linked above for
|
||||
|
@@ -54,7 +54,7 @@ class EventType extends AbstractType
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Chill\EventBundle\Entity\Event',
|
||||
'data_class' => \Chill\EventBundle\Entity\Event::class,
|
||||
]);
|
||||
$resolver
|
||||
->setRequired(['center', 'role'])
|
||||
|
@@ -36,7 +36,7 @@ class EventTypeType extends AbstractType
|
||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Chill\EventBundle\Entity\EventType',
|
||||
'data_class' => \Chill\EventBundle\Entity\EventType::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ class RoleType extends AbstractType
|
||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Chill\EventBundle\Entity\Role',
|
||||
'data_class' => \Chill\EventBundle\Entity\Role::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ class StatusType extends AbstractType
|
||||
public function setDefaultOptions(OptionsResolverInterface $resolver)
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Chill\EventBundle\Entity\Status',
|
||||
'data_class' => \Chill\EventBundle\Entity\Status::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user