Completed
Pull Request — master (#212)
by jelmer
61:21 queued 59:18
created
src/SumoCoders/FrameworkCoreBundle/Form/Type/OtherChoiceType.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,21 +37,21 @@  discard block
 block discarded – undo
37 37
             [
38 38
                 'label' => false,
39 39
                 'choice_loader' => new CallbackChoiceLoader(
40
-                    function () use ($category) : array {
40
+                    function() use ($category) : array {
41 41
                         $choices = (array) $this->repository->findBy(['category' => $category], ['label' => 'ASC']);
42 42
                         $choices[] = $this->otherChoiceOption->getWithNewChoiceOptionCategory($category);
43 43
 
44 44
                         return $choices;
45 45
                     }
46 46
                 ),
47
-                'choice_value' => function (OtherChoiceOption $choiceOption = null) : string {
47
+                'choice_value' => function(OtherChoiceOption $choiceOption = null) : string {
48 48
                     if ($choiceOption === null) {
49 49
                         return '';
50 50
                     }
51 51
 
52 52
                     return $choiceOption->getValue();
53 53
                 },
54
-                'choice_label' => function (OtherChoiceOption $choiceOption) : string {
54
+                'choice_label' => function(OtherChoiceOption $choiceOption) : string {
55 55
                     return (string) $choiceOption;
56 56
                 },
57 57
                 'placeholder' => $options['placeholder'],
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
             ]
71 71
         )->addModelTransformer(
72 72
             new CallbackTransformer(
73
-                function (?OtherChoiceOption $selectedOption) : array {
73
+                function(?OtherChoiceOption $selectedOption) : array {
74 74
                     return [
75 75
                         'choices' => $selectedOption,
76 76
                         'other' => null,
77 77
                     ];
78 78
                 },
79
-                function (array $data) : ?OtherChoiceOption {
79
+                function(array $data) : ?OtherChoiceOption {
80 80
                     if ($data['choices'] === null) {
81 81
                         return null;
82 82
                     }
Please login to merge, or discard this patch.