Passed
Push — master ( dae29c...e8f83f )
by Jan
05:07
created
src/Form/CollectionTypeExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function buildForm(FormBuilderInterface $builder, array $options)
76 76
     {
77
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options) {
77
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options) {
78 78
             $data = $event->getData();
79 79
             $config = $event->getForm()->getConfig();
80 80
             //If enabled do a reindexing of the collection
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
                 foreach ($data->toArray() as $key => $item) {
87 87
                     $id = $this->propertyAccess->getValue($item, $options['reindex_path']);
88 88
                     //If element has an ID then use it. otherwise use default key
89
-                    $index = $id === null ? $key : $options['reindex_prefix'] . $id;
90
-                    $error_mapping['[' . $key . ']'] = $index;
89
+                    $index = $id === null ? $key : $options['reindex_prefix'].$id;
90
+                    $error_mapping['['.$key.']'] = $index;
91 91
                     $reindexed_data->set($index, $item);
92 92
                 }
93 93
                 $event->setData($reindexed_data);
Please login to merge, or discard this patch.
src/Form/Type/StructuralEntityType.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
     public function buildForm(FormBuilderInterface $builder, array $options): void
83 83
     {
84 84
         $builder->addModelTransformer(new CallbackTransformer(
85
-                                          function ($value) use ($options) {
85
+                                          function($value) use ($options) {
86 86
                                               return $this->transform($value, $options);
87
-                                          }, function ($value) use ($options) {
87
+                                          }, function($value) use ($options) {
88 88
                                           return $this->reverseTransform($value, $options);
89 89
                                       }));
90 90
     }
@@ -94,21 +94,21 @@  discard block
 block discarded – undo
94 94
         $resolver->setRequired(['class']);
95 95
         $resolver->setDefaults([
96 96
                                    'show_fullpath_in_subtext' => true, //When this is enabled, the full path will be shown in subtext
97
-                                   'subentities_of' => null,   //Only show entities with the given parent class
98
-                                   'disable_not_selectable' => false,  //Disable entries with not selectable property
97
+                                   'subentities_of' => null, //Only show entities with the given parent class
98
+                                   'disable_not_selectable' => false, //Disable entries with not selectable property
99 99
                                    'choice_value' => 'id', //Use the element id as option value and for comparing items
100
-                                   'choice_loader' => function (Options $options) {
101
-                                       return new CallbackChoiceLoader(function () use ($options) {
100
+                                   'choice_loader' => function(Options $options) {
101
+                                       return new CallbackChoiceLoader(function() use ($options) {
102 102
                                            return $this->getEntries($options);
103 103
                                        });
104 104
                                    },
105
-                                   'choice_label' => function (Options $options) {
106
-                                       return function ($choice, $key, $value) use ($options) {
105
+                                   'choice_label' => function(Options $options) {
106
+                                       return function($choice, $key, $value) use ($options) {
107 107
                                            return $this->generateChoiceLabels($choice, $key, $value, $options);
108 108
                                        };
109 109
                                    },
110
-                                   'choice_attr' => function (Options $options) {
111
-                                       return function ($choice, $key, $value) use ($options) {
110
+                                   'choice_attr' => function(Options $options) {
111
+                                       return function($choice, $key, $value) use ($options) {
112 112
                                            return $this->generateChoiceAttr($choice, $key, $value, $options);
113 113
                                        };
114 114
                                    },
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         $resolver->setDefault('empty_message', null);
119 119
 
120
-        $resolver->setDefault('attr', function (Options $options) {
120
+        $resolver->setDefault('attr', function(Options $options) {
121 121
             $tmp = [
122 122
                 'class' => 'selectpicker',
123 123
                 'data-live-search' => true,
Please login to merge, or discard this patch.