Completed
Pull Request — 2.3 (#1139)
by
unknown
16:37 queued 12:46
created
Bundle/CoreBundle/Form/WidgetType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         //we use the PRE_SUBMIT event to set the mode option
74 74
         $builder->addEventListener(
75 75
             FormEvents::PRE_SUBMIT,
76
-            function (FormEvent $event) use ($options) {
76
+            function(FormEvent $event) use ($options) {
77 77
                 //we get the raw data for the widget form
78 78
                 $rawData = $event->getData();
79 79
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         ]);
118 118
         $builder->addEventListener(
119 119
             FormEvents::PRE_SET_DATA,
120
-            function (FormEvent $event) use ($options) {
120
+            function(FormEvent $event) use ($options) {
121 121
                 $dataSources = $options['dataSources']->getDataSources();
122 122
                 $widget = $event->getData();
123 123
                 foreach ($dataSources as $alias => $dataSource) {
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         );
132 132
         $builder->addEventListener(
133 133
             FormEvents::POST_SUBMIT,
134
-            function (FormEvent $event) {
134
+            function(FormEvent $event) {
135 135
                 $widget = $event->getData();
136 136
                 /** @var Criteria $criteria */
137 137
                 foreach ($widget->getCriterias() as $criteria) {
Please login to merge, or discard this patch.
Bundle/CoreBundle/Repository/ViewRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
             $pageId = $page->getId();
90 90
             $viewReference = array_filter(
91 91
                 $viewReferences,
92
-                function ($e) use ($pageId) {
92
+                function($e) use ($pageId) {
93 93
                     return $e->getViewId() == $pageId;
94 94
                 }
95 95
             );
Please login to merge, or discard this patch.
Bundle/BlogBundle/Form/ChooseBlogType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         $builder->addEventListener(
56 56
             FormEvents::PRE_SET_DATA,
57
-            function (FormEvent $event) use ($currentLocale, $currentBlog) {
57
+            function(FormEvent $event) use ($currentLocale, $currentBlog) {
58 58
                 $data = $event->getData();
59 59
                 $event->setData([
60 60
                     'locale' => $data['locale'] !== null ? $data['locale'] : $currentLocale,
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         if ($localesNb > 1 && $blogsNb > 1) {
68 68
             $builder->addEventListener(
69 69
                 FormEvents::PRE_SUBMIT,
70
-                function (FormEvent $event) use ($currentLocale, $currentBlog, $localesNb) {
70
+                function(FormEvent $event) use ($currentLocale, $currentBlog, $localesNb) {
71 71
                     $data = $event->getData();
72 72
                     $currentLocale = $data['locale'] !== null ? $data['locale'] : $currentLocale;
73 73
                     $availableBlogs = $localesNb > 1 ? $this->blogRepository->getBlogsForLocale($currentLocale) : $this->blogRepository->findAll();
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
             $additionalParameters = [
127 127
                 'choices'           => $availableBlogs,
128 128
                 'choices_as_values' => true,
129
-                'choice_value'      => function (Blog $currentBlog) {
129
+                'choice_value'      => function(Blog $currentBlog) {
130 130
                     return $currentBlog->getId();
131 131
                 },
132
-                'choice_label' => function (Blog $currentBlog) use ($currentLocale) {
132
+                'choice_label' => function(Blog $currentBlog) use ($currentLocale) {
133 133
                     $currentBlog->setCurrentLocale($currentLocale);
134 134
 
135 135
                     return $currentBlog->getName();
Please login to merge, or discard this patch.