@@ -58,7 +58,7 @@ |
||
| 58 | 58 | ->getQuery() |
| 59 | 59 | ->getResult(); |
| 60 | 60 | $templates = []; |
| 61 | - $recursiveGetTemplates = function ($template) use (&$recursiveGetTemplates, &$templates) { |
|
| 61 | + $recursiveGetTemplates = function($template) use (&$recursiveGetTemplates, &$templates) { |
|
| 62 | 62 | array_push($templates, $template); |
| 63 | 63 | foreach ($template->getInheritors() as $template) { |
| 64 | 64 | if ($template instanceof Template) { |
@@ -158,7 +158,7 @@ |
||
| 158 | 158 | if (array_key_exists('cache_timout', $widgetParams)) { |
| 159 | 159 | return $widgetParams['cache_timout']; |
| 160 | 160 | } else { |
| 161 | - return 7 * 24 * 60 * 1000; // one week by default |
|
| 161 | + return 7*24*60*1000; // one week by default |
|
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | } |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | ->scalarNode('class')->end() |
| 65 | 65 | ->scalarNode('name')->end() |
| 66 | 66 | ->scalarNode('cache')->defaultTrue()->end() |
| 67 | - ->scalarNode('cache_timeout')->defaultValue(7 * 24 * 60 * 1000)->end() //one week |
|
| 67 | + ->scalarNode('cache_timeout')->defaultValue(7*24*60*1000)->end() //one week |
|
| 68 | 68 | ->end() |
| 69 | 69 | ->end() |
| 70 | 70 | ->defaultValue([]) |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'choices_as_values' => true, |
| 68 | 68 | 'vic_vic_widget_form_group_attr' => ['class' => 'vic-form-group viewReference-type page-type url-type route-type attachedWidget-type'], |
| 69 | 69 | ]) |
| 70 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($builder) { |
|
| 70 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($builder) { |
|
| 71 | 71 | $data = $event->getData(); |
| 72 | 72 | $form = $event->getForm(); |
| 73 | 73 | if ($data) { |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | }); |
| 80 | 80 | |
| 81 | 81 | $builder |
| 82 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($builder) { |
|
| 82 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($builder) { |
|
| 83 | 83 | $form = $event->getForm(); |
| 84 | 84 | $data = $event->getData(); |
| 85 | 85 | $locale = isset($data['locale']) ? $data['locale'] : null; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $references = $this->repository->getResults($refsId); |
| 89 | 89 | foreach ($references as $reference) { |
| 90 | 90 | if ($transform === true) { |
| 91 | - $transformViewReferenceFn = function ($parentViewReference) use (&$transformViewReferenceFn, $keepChildren) { |
|
| 91 | + $transformViewReferenceFn = function($parentViewReference) use (&$transformViewReferenceFn, $keepChildren) { |
|
| 92 | 92 | $transformer = ViewReferenceManager::findTransformerFromElement($parentViewReference); |
| 93 | 93 | $reference = $transformer->transform($parentViewReference); |
| 94 | 94 | if ($keepChildren) { |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | { |
| 153 | 153 | $viewsReferences = []; |
| 154 | 154 | |
| 155 | - $decoratorFn = function ($depth, $char0 = '└', $char = '─') { |
|
| 155 | + $decoratorFn = function($depth, $char0 = '└', $char = '─') { |
|
| 156 | 156 | $decorator = $char0; |
| 157 | 157 | for ($i = 0; $i <= $depth; $i++) { |
| 158 | 158 | $decorator .= $char; |
@@ -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 | |
@@ -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']] = [ |
@@ -495,7 +495,7 @@ |
||
| 495 | 495 | */ |
| 496 | 496 | public function hasCriteriaNamed($criteriaAlias) |
| 497 | 497 | { |
| 498 | - return $this->criterias->exists(function ($key, $element) use ($criteriaAlias) { |
|
| 498 | + return $this->criterias->exists(function($key, $element) use ($criteriaAlias) { |
|
| 499 | 499 | return $criteriaAlias === $element->getName(); |
| 500 | 500 | }); |
| 501 | 501 | } |