Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
18 | final class GenderType extends AbstractType |
||
19 | { |
||
20 | public const TYPE_MALE = 'm'; |
||
21 | |||
22 | public const TYPE_FEMALE = 'f'; |
||
23 | |||
24 | public function configureOptions(OptionsResolver $resolver): void |
||
25 | { |
||
26 | $resolver->setDefaults([ |
||
27 | 'choices' => [ |
||
28 | 'male' => static::TYPE_MALE, |
||
29 | 'female' => static::TYPE_FEMALE, |
||
30 | ], |
||
31 | 'choice_label' => static function ($value, $key, $index) { |
||
|
|||
32 | return 'gender.'.$key; |
||
33 | }, |
||
34 | 'choice_translation_domain' => 'Core23FormBundle', |
||
35 | ]); |
||
36 | } |
||
37 | |||
38 | public function getParent() |
||
41 | } |
||
42 | |||
43 | public function getBlockPrefix() |
||
48 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.