@@ -97,7 +97,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
9797 'type ' => PasswordType::class,
9898 'required ' => $ passwordRequired ,
9999 'constraints ' => $ passwordConstraints ,
100- 'first_options ' => [
100+ 'first_options ' => [
101101 'label ' => 'password ' ,
102102 'attr ' => [
103103 'autocomplete ' => 'new-password ' ,
@@ -115,7 +115,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
115115 $ builder ->add ('roles ' , ChoiceType::class, [
116116 'multiple ' => true ,
117117 'choices ' => $ options ['roles ' ],
118- 'choice_label ' => function ($ choice , $ key , $ value ) use ($ options ) {
118+ 'choice_label ' => static function ($ choice , $ key , $ value ) use ($ options ) {
119119 return $ options ['roles ' ][$ key ];
120120 },
121121 'choice_translation_domain ' => false ,
@@ -129,7 +129,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
129129 }
130130 }
131131
132- $ builder ->addEventListener (FormEvents::POST_SUBMIT , function (FormEvent $ event ) use ($ options ) {
132+ $ builder ->addEventListener (FormEvents::POST_SUBMIT , function (FormEvent $ event ) use ($ options ): void {
133133 $ form = $ event ->getForm ();
134134
135135 if ('register ' == $ options ['context ' ]) {
0 commit comments