@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | //we use the PRE_SUBMIT event to set the mode option |
| 77 | 77 | $builder->addEventListener( |
| 78 | 78 | FormEvents::PRE_SUBMIT, |
| 79 | - function (FormEvent $event) use ($options) { |
|
| 79 | + function(FormEvent $event) use ($options) { |
|
| 80 | 80 | //we get the raw data for the widget form |
| 81 | 81 | $rawData = $event->getData(); |
| 82 | 82 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | $builder->addEventListener( |
| 105 | 105 | FormEvents::PRE_SET_DATA, |
| 106 | - function (FormEvent $event) use ($options) { |
|
| 106 | + function(FormEvent $event) use ($options) { |
|
| 107 | 107 | $dataSources = $options['dataSources']->getDataSources(); |
| 108 | 108 | $widget = $event->getData(); |
| 109 | 109 | foreach ($dataSources as $alias => $dataSource) { |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | ); |
| 119 | 119 | $builder->addEventListener( |
| 120 | 120 | FormEvents::POST_SUBMIT, |
| 121 | - function (FormEvent $event) use ($options) { |
|
| 121 | + function(FormEvent $event) use ($options) { |
|
| 122 | 122 | $widget = $event->getData(); |
| 123 | 123 | /** @var Criteria $criteria */ |
| 124 | 124 | foreach ($widget->getCriterias() as $criteria) { |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | //we use the PRE_SUBMIT event to set the mode option |
| 67 | 67 | $builder->addEventListener( |
| 68 | 68 | FormEvents::PRE_SUBMIT, |
| 69 | - function (FormEvent $event) use ($options) { |
|
| 69 | + function(FormEvent $event) use ($options) { |
|
| 70 | 70 | //we get the raw data for the widget form |
| 71 | 71 | $rawData = $event->getData(); |
| 72 | 72 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | * |
| 29 | 29 | * This method should only be used in ajax calls. |
| 30 | 30 | * |
| 31 | - * @param Form $form The form to parse |
|
| 31 | + * @param \Symfony\Component\Form\Form $form The form to parse |
|
| 32 | 32 | * @param bool $withChildren Do we parse the embedded forms |
| 33 | 33 | * |
| 34 | 34 | * @return string A string representation of all errors |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | public function addDataSource($dataSource, $parameters) |
| 22 | 22 | { |
| 23 | 23 | $method = $parameters['method']; |
| 24 | - $data = function () use ($dataSource, $method) { |
|
| 24 | + $data = function() use ($dataSource, $method) { |
|
| 25 | 25 | return $dataSource->{$method}(); |
| 26 | 26 | }; |
| 27 | 27 | $this->dataSource[$parameters['alias']] = [ |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $widget = $widgetMap->getWidget(); |
| 44 | 44 | $widget->setWidgetMap($widgetMap); |
| 45 | 45 | $widgetMap->setWidget(null); |
| 46 | - if ($key % 100 == 0) { |
|
| 46 | + if ($key%100 == 0) { |
|
| 47 | 47 | $entityManager->flush(); |
| 48 | 48 | } |
| 49 | 49 | $progress->advance(); |
@@ -301,7 +301,7 @@ |
||
| 301 | 301 | |
| 302 | 302 | /** |
| 303 | 303 | * @param View $page |
| 304 | - * @param $locale |
|
| 304 | + * @param string $locale |
|
| 305 | 305 | */ |
| 306 | 306 | private function refreshPage(View $page, $locale) |
| 307 | 307 | { |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 7 | -use Symfony\Component\HttpFoundation\JsonResponse; |
|
| 8 | 7 | use Symfony\Component\HttpFoundation\Request; |
| 9 | 8 | use Symfony\Component\HttpFoundation\Response; |
| 10 | 9 | use Victoire\Bundle\AnalyticsBundle\Entity\BrowseEvent; |