mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 18:14:59 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -63,7 +63,7 @@ class EventChoiceLoader implements ChoiceLoaderInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function loadChoicesForValues(array $values, $value = null)
|
||||
public function loadChoicesForValues(array $values, $value = null): array
|
||||
{
|
||||
$choices = [];
|
||||
|
||||
@@ -92,7 +92,7 @@ class EventChoiceLoader implements ChoiceLoaderInterface
|
||||
*
|
||||
* @return array|string[]
|
||||
*/
|
||||
public function loadValuesForChoices(array $choices, $value = null)
|
||||
public function loadValuesForChoices(array $choices, $value = null): array
|
||||
{
|
||||
$values = [];
|
||||
|
||||
|
@@ -30,7 +30,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class EventType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('name', TextType::class, [
|
||||
@@ -76,7 +76,7 @@ class EventType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Event::class,
|
||||
@@ -90,7 +90,7 @@ class EventType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_eventbundle_event';
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class EventTypeType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('name', TranslatableStringFormType::class)
|
||||
@@ -27,12 +27,12 @@ class EventTypeType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_eventbundle_eventtype';
|
||||
}
|
||||
|
||||
public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver)
|
||||
public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => \Chill\EventBundle\Entity\EventType::class,
|
||||
|
@@ -29,7 +29,7 @@ final class ParticipationType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
// local copy of variable for Closure
|
||||
$translatableStringHelper = $this->translatableStringHelper;
|
||||
@@ -45,7 +45,7 @@ final class ParticipationType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefined('event_type')
|
||||
->setAllowedTypes('event_type', ['null', EventType::class])
|
||||
|
@@ -22,7 +22,7 @@ final class RoleType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('name', TranslatableStringFormType::class)
|
||||
@@ -36,12 +36,12 @@ final class RoleType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_eventbundle_role';
|
||||
}
|
||||
|
||||
public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver)
|
||||
public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => \Chill\EventBundle\Entity\Role::class,
|
||||
|
@@ -18,7 +18,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class StatusType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('name', TranslatableStringFormType::class)
|
||||
@@ -29,12 +29,12 @@ class StatusType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_eventbundle_status';
|
||||
}
|
||||
|
||||
public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver)
|
||||
public function configureOptions(\Symfony\Component\OptionsResolver\OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => \Chill\EventBundle\Entity\Status::class,
|
||||
|
@@ -45,7 +45,7 @@ final class PickEventType extends AbstractType
|
||||
private readonly Security $security,
|
||||
) {}
|
||||
|
||||
public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options)
|
||||
public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options): void
|
||||
{
|
||||
$view->vars['attr']['data-person-picker'] = true;
|
||||
$view->vars['attr']['data-select-interactive-loading'] = true;
|
||||
@@ -57,7 +57,7 @@ final class PickEventType extends AbstractType
|
||||
$view->vars['attr']['data-searching-label'] = $this->translator->trans('select2.searching');
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
parent::configureOptions($resolver);
|
||||
|
||||
|
@@ -33,7 +33,7 @@ class PickEventTypeType extends AbstractType
|
||||
$this->translatableStringHelper = $helper;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$helper = $this->translatableStringHelper;
|
||||
$resolver->setDefaults(
|
||||
@@ -47,7 +47,7 @@ class PickEventTypeType extends AbstractType
|
||||
);
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): ?string
|
||||
{
|
||||
return EntityType::class;
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ final class PickRoleType extends AbstractType
|
||||
private readonly RoleRepository $roleRepository,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
// create copy for easier management
|
||||
$qb = $options['query_builder'];
|
||||
@@ -69,7 +69,7 @@ final class PickRoleType extends AbstractType
|
||||
}
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
// create copy for use in Closure
|
||||
$translatableStringHelper = $this->translatableStringHelper;
|
||||
@@ -100,7 +100,7 @@ final class PickRoleType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): ?string
|
||||
{
|
||||
return EntityType::class;
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ final class PickStatusType extends AbstractType
|
||||
{
|
||||
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected TranslatorInterface $translator, protected StatusRepository $statusRepository) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$qb = $options['query_builder'];
|
||||
|
||||
@@ -66,7 +66,7 @@ final class PickStatusType extends AbstractType
|
||||
}
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
// create copy for use in Closure
|
||||
$translatableStringHelper = $this->translatableStringHelper;
|
||||
@@ -97,7 +97,7 @@ final class PickStatusType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): ?string
|
||||
{
|
||||
return EntityType::class;
|
||||
}
|
||||
|
Reference in New Issue
Block a user