mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-04 20:39:40 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -22,7 +22,7 @@ class AccompanyingCourseCommentType extends AbstractType
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder->add('content', ChillTextareaType::class, [
|
||||
'required' => false,
|
||||
@@ -33,7 +33,7 @@ class AccompanyingCourseCommentType extends AbstractType
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefault('class', Comment::class);
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class AccompanyingCourseType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder->add(
|
||||
'closingDate',
|
||||
|
@@ -46,7 +46,7 @@ class AccompanyingPeriodType extends AbstractType
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
// if the period_action is close, date opening should not be seen
|
||||
if ('close' !== $options['period_action']) {
|
||||
@@ -89,12 +89,12 @@ class AccompanyingPeriodType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function buildView(FormView $view, FormInterface $form, array $options)
|
||||
public function buildView(FormView $view, FormInterface $form, array $options): void
|
||||
{
|
||||
$view->vars['action'] = $options['period_action'];
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => \Chill\PersonBundle\Entity\AccompanyingPeriod::class,
|
||||
@@ -111,7 +111,7 @@ class AccompanyingPeriodType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_personbundle_accompanyingperiod';
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ class PersonChoiceLoader implements ChoiceLoaderInterface
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function loadChoicesForValues(array $values, $value = null)
|
||||
public function loadChoicesForValues(array $values, $value = null): array
|
||||
{
|
||||
$choices = [];
|
||||
|
||||
@@ -79,7 +79,7 @@ class PersonChoiceLoader implements ChoiceLoaderInterface
|
||||
*
|
||||
* @return array|string[]
|
||||
*/
|
||||
public function loadValuesForChoices(array $choices, $value = null)
|
||||
public function loadValuesForChoices(array $choices, $value = null): array
|
||||
{
|
||||
$values = [];
|
||||
|
||||
|
@@ -28,7 +28,7 @@ class ClosingMotiveType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('name', TranslatableStringFormType::class, [
|
||||
@@ -57,7 +57,7 @@ class ClosingMotiveType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', ClosingMotive::class);
|
||||
|
@@ -50,7 +50,7 @@ final class CreationPersonType extends AbstractType
|
||||
$this->askCenters = $parameterBag->get('chill_main')['acl']['form_show_centers'];
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('firstName')
|
||||
@@ -109,7 +109,7 @@ final class CreationPersonType extends AbstractType
|
||||
);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Person::class,
|
||||
@@ -122,7 +122,7 @@ final class CreationPersonType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return self::NAME;
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ class HouseholdCompositionType extends AbstractType
|
||||
$this->household_fields_visibility = $parameterBag->get('chill_person.household_fields');
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$types = $this->householdCompositionTypeRepository->findAllActive();
|
||||
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class HouseholdCompositionTypeType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('label', TranslatableStringFormType::class)
|
||||
@@ -30,7 +30,7 @@ class HouseholdCompositionTypeType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', HouseholdCompositionType::class);
|
||||
|
@@ -18,7 +18,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class HouseholdMemberType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('startDate', ChillDateType::class, [
|
||||
|
@@ -21,7 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class HouseholdPositionType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('label', TranslatableStringFormType::class)
|
||||
@@ -39,7 +39,7 @@ class HouseholdPositionType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', Position::class);
|
||||
|
@@ -21,7 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class HouseholdType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('commentMembers', CommentType::class, [
|
||||
@@ -39,7 +39,7 @@ class HouseholdType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Household::class,
|
||||
|
@@ -22,7 +22,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
*/
|
||||
class MaritalStatusType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('name', TranslatableStringFormType::class, [
|
||||
@@ -30,7 +30,7 @@ class MaritalStatusType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', MaritalStatus::class);
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class OriginType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('label', TranslatableStringFormType::class)
|
||||
@@ -31,7 +31,7 @@ class OriginType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', Origin::class);
|
||||
|
@@ -17,7 +17,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class PersonConfimDuplicateType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('confirm', CheckboxType::class, [
|
||||
@@ -29,7 +29,7 @@ class PersonConfimDuplicateType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_personbundle_person_confirm_duplicate';
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class PersonFindManuallyDuplicateType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('person', PickPersonDynamicType::class, [
|
||||
@@ -33,7 +33,7 @@ class PersonFindManuallyDuplicateType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_personbundle_person_find_manually_duplicate';
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class PersonResourceKindType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('title', TranslatableStringFormType::class)
|
||||
@@ -32,7 +32,7 @@ class PersonResourceKindType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', PersonResourceKind::class);
|
||||
|
@@ -31,7 +31,7 @@ final class PersonResourceType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly ResourceKindRender $resourceKindRender, private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('kind', EntityType::class, [
|
||||
|
@@ -69,7 +69,7 @@ class PersonType extends AbstractType
|
||||
$this->configAltNamesHelper = $configAltNamesHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('firstName')
|
||||
@@ -235,7 +235,7 @@ class PersonType extends AbstractType
|
||||
/**
|
||||
* @param OptionsResolverInterface $resolver
|
||||
*/
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Person::class,
|
||||
@@ -254,7 +254,7 @@ class PersonType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'chill_personbundle_person';
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class RelationType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('title', TranslatableStringFormType::class, [
|
||||
@@ -34,7 +34,7 @@ class RelationType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', Relation::class);
|
||||
|
@@ -23,7 +23,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
final class ResidentialAddressType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('startDate', DateType::class, [
|
||||
@@ -65,7 +65,7 @@ final class ResidentialAddressType extends AbstractType
|
||||
}
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => ResidentialAddress::class,
|
||||
|
@@ -36,7 +36,7 @@ class EvaluationType extends AbstractType
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('title', TranslatableStringFormType::class, [
|
||||
@@ -64,7 +64,7 @@ class EvaluationType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', Evaluation::class);
|
||||
|
@@ -36,7 +36,7 @@ class GoalType extends AbstractType
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('title', TranslatableStringFormType::class, [
|
||||
@@ -55,7 +55,7 @@ class GoalType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', Goal::class);
|
||||
|
@@ -34,7 +34,7 @@ class ResultType extends AbstractType
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('title', TranslatableStringFormType::class, [
|
||||
@@ -47,7 +47,7 @@ class ResultType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', Result::class);
|
||||
|
@@ -41,7 +41,7 @@ class SocialActionType extends AbstractType
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('title', TranslatableStringFormType::class, [
|
||||
@@ -95,7 +95,7 @@ class SocialActionType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', SocialIssue::class);
|
||||
|
@@ -25,7 +25,7 @@ class SocialIssueType extends AbstractType
|
||||
{
|
||||
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('title', TranslatableStringFormType::class, [
|
||||
@@ -53,7 +53,7 @@ class SocialIssueType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefault('class', SocialIssue::class);
|
||||
|
||||
|
@@ -54,7 +54,7 @@ class ClosingMotivePickerType extends AbstractType
|
||||
$this->repository = $closingMotiveRepository;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'class' => ClosingMotive::class,
|
||||
@@ -73,7 +73,7 @@ class ClosingMotivePickerType extends AbstractType
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'closing_motive';
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ class PersonAltNameType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly ConfigPersonAltNamesHelper $configHelper, private readonly TranslatableStringHelper $translatableStringHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
foreach ($this->getKeyChoices() as $label => $key) {
|
||||
$builder->add(
|
||||
@@ -39,7 +39,7 @@ class PersonAltNameType extends AbstractType
|
||||
$builder->setDataMapper(new \Chill\PersonBundle\Form\DataMapper\PersonAltNameDataMapper());
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('class', \Chill\PersonBundle\Entity\PersonAltName::class)
|
||||
|
@@ -26,7 +26,7 @@ class PersonPhoneType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly PhonenumberHelper $phonenumberHelper, private readonly EntityManagerInterface $em) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder->add('phonenumber', ChillPhoneNumberType::class, [
|
||||
'label' => 'Other phonenumber',
|
||||
@@ -52,7 +52,7 @@ class PersonPhoneType extends AbstractType
|
||||
});
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefaults([
|
||||
|
@@ -25,7 +25,7 @@ class PickAdministrativeStatusType extends AbstractType
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('label', 'Administrative Status')
|
||||
@@ -43,7 +43,7 @@ class PickAdministrativeStatusType extends AbstractType
|
||||
->setDefault('class', AdministrativeStatus::class);
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): ?string
|
||||
{
|
||||
return EntityType::class;
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ class PickEmploymentStatusType extends AbstractType
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('label', 'Employment status')
|
||||
@@ -43,7 +43,7 @@ class PickEmploymentStatusType extends AbstractType
|
||||
->setDefault('class', EmploymentStatus::class);
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): ?string
|
||||
{
|
||||
return EntityType::class;
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ class PickGenderType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('label', 'Gender')
|
||||
@@ -44,7 +44,7 @@ class PickGenderType extends AbstractType
|
||||
->setDefault('class', Gender::class);
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): ?string
|
||||
{
|
||||
return EntityType::class;
|
||||
}
|
||||
|
@@ -28,12 +28,12 @@ class PickPersonDynamicType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder->addViewTransformer(new EntityToJsonTransformer($this->denormalizer, $this->serializer, $options['multiple'], 'person'));
|
||||
}
|
||||
|
||||
public function buildView(FormView $view, FormInterface $form, array $options)
|
||||
public function buildView(FormView $view, FormInterface $form, array $options): void
|
||||
{
|
||||
$view->vars['multiple'] = $options['multiple'];
|
||||
$view->vars['types'] = ['person'];
|
||||
@@ -47,7 +47,7 @@ class PickPersonDynamicType extends AbstractType
|
||||
}
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefault('multiple', false)
|
||||
@@ -60,7 +60,7 @@ class PickPersonDynamicType extends AbstractType
|
||||
->setAllowedTypes('submit_on_adding_new_entity', ['bool']);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'pick_entity_dynamic';
|
||||
}
|
||||
|
@@ -51,7 +51,7 @@ final class PickPersonType extends AbstractType
|
||||
private readonly TranslatorInterface $translator,
|
||||
) {}
|
||||
|
||||
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;
|
||||
@@ -63,7 +63,7 @@ final class PickPersonType 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);
|
||||
|
||||
@@ -92,7 +92,7 @@ final class PickPersonType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): ?string
|
||||
{
|
||||
return EntityType::class;
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ class PickSocialActionType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository) {}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefaults([
|
||||
|
@@ -22,7 +22,7 @@ class PickSocialIssueType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly SocialIssueRender $issueRender, private readonly SocialIssueRepository $issueRepository) {}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver
|
||||
->setDefaults([
|
||||
|
@@ -27,13 +27,13 @@ class Select2MaritalStatusType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly EntityManagerInterface $em) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$transformer = new ObjectToIdTransformer($this->em, MaritalStatus::class);
|
||||
$builder->addModelTransformer($transformer);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$maritalStatuses = $this->em->getRepository(MaritalStatus::class)->findAll();
|
||||
$choices = [];
|
||||
@@ -50,12 +50,12 @@ class Select2MaritalStatusType extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'select2_chill_marital_status';
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): ?string
|
||||
{
|
||||
return Select2ChoiceType::class;
|
||||
}
|
||||
|
Reference in New Issue
Block a user