@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function buildForm(FormBuilderInterface $builder, array $options) |
41 | 41 | { |
42 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
42 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
43 | 43 | $view = $event->getData(); |
44 | 44 | $form = $event->getForm(); |
45 | 45 | |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | // Si aucune donnée n'est passée au formulaire, la donnée est "null". |
50 | 50 | // Ce doit être considéré comme une nouvelle "View" |
51 | 51 | if ($this->isNew) { |
52 | - $getAllTemplateWithoutMe = function (EntityRepository $tr) { |
|
52 | + $getAllTemplateWithoutMe = function(EntityRepository $tr) { |
|
53 | 53 | return $tr->getAll()->getInstance(); |
54 | 54 | }; |
55 | 55 | } else { |
56 | - $getAllTemplateWithoutMe = function (EntityRepository $tr) use ($view) { |
|
56 | + $getAllTemplateWithoutMe = function(EntityRepository $tr) use ($view) { |
|
57 | 57 | return $tr->getAll() |
58 | 58 | ->getInstance() |
59 | 59 | ->andWhere('template.id != :templateId') |
@@ -85,11 +85,11 @@ discard block |
||
85 | 85 | // Si aucune donnée n'est passée au formulaire, la donnée est "null". |
86 | 86 | // Ce doit être considéré comme une nouvelle "View" |
87 | 87 | if (!$view || null === $view->getId()) { |
88 | - $getAllPageWithoutMe = function (EntityRepository $repo) { |
|
88 | + $getAllPageWithoutMe = function(EntityRepository $repo) { |
|
89 | 89 | return $repo->getAll()->getInstance(); |
90 | 90 | }; |
91 | 91 | } else { |
92 | - $getAllPageWithoutMe = function (EntityRepository $repo) use ($view) { |
|
92 | + $getAllPageWithoutMe = function(EntityRepository $repo) use ($view) { |
|
93 | 93 | return $repo->getAll() |
94 | 94 | ->getInstance() |
95 | 95 | ->andWhere('page.id != :pageId') |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | return $collection; |
30 | 30 | } |
31 | 31 | |
32 | - protected function addVictoireRouting(RouteCollection &$collection) |
|
32 | + protected function addVictoireRouting(RouteCollection & $collection) |
|
33 | 33 | { |
34 | 34 | $resources = [ |
35 | 35 | '@VictoireAnalyticsBundle/Controller/', |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | } |
50 | 50 | } |
51 | 51 | |
52 | - protected function addWidgetsRouting(RouteCollection &$collection) |
|
52 | + protected function addWidgetsRouting(RouteCollection & $collection) |
|
53 | 53 | { |
54 | 54 | foreach ($this->widgets as $widgetParams) { |
55 | 55 | $controllerResource = '@VictoireWidget'.$widgetParams['name'].'Bundle/Controller/'; |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
63 | - protected function addShowBusinessPageByIdAction(RouteCollection &$collection) |
|
63 | + protected function addShowBusinessPageByIdAction(RouteCollection & $collection) |
|
64 | 64 | { |
65 | 65 | $pattern = '/victoire-dcms-public/show-business-page-by-id/{entityId}/{type}'; |
66 | 66 | $defaults = [ |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $collection->add($routeName, $route); |
75 | 75 | } |
76 | 76 | |
77 | - protected function addShowPageByIdRoute(RouteCollection &$collection) |
|
77 | + protected function addShowPageByIdRoute(RouteCollection & $collection) |
|
78 | 78 | { |
79 | 79 | $pattern = '/victoire-dcms-public/show-page-by-id/{viewId}/{entityId}'; |
80 | 80 | $defaults = [ |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $collection->add($routeName, $route); |
93 | 93 | } |
94 | 94 | |
95 | - protected function addShowPageRoute(RouteCollection &$collection) |
|
95 | + protected function addShowPageRoute(RouteCollection & $collection) |
|
96 | 96 | { |
97 | 97 | // prepare a new route |
98 | 98 | $pattern = '/{url}'; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $collection->add('victoire_core_page_show', $route); |
109 | 109 | } |
110 | 110 | |
111 | - protected function addShowHomePageRoute(RouteCollection &$collection) |
|
111 | + protected function addShowHomePageRoute(RouteCollection & $collection) |
|
112 | 112 | { |
113 | 113 | // prepare a new route |
114 | 114 | $pattern = '/'; |
@@ -179,7 +179,7 @@ |
||
179 | 179 | $viewRepository = $entityManager->getRepository('VictoireCoreBundle:View'); |
180 | 180 | $tree = $viewRepository->getRootNodes(); |
181 | 181 | |
182 | - $insertFunc = function ($views, $toInsert) use (&$insertFunc) { |
|
182 | + $insertFunc = function($views, $toInsert) use (&$insertFunc) { |
|
183 | 183 | foreach ($views as $_view) { |
184 | 184 | if ($toInsert->getParent() === $_view) { |
185 | 185 | $_view->addChild($toInsert); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | if ($xmlReferences = $this->driver->readCache()->xpath(ViewReferenceHelper::buildXpath($parameters))) { |
92 | 92 | foreach ($xmlReferences as $reference) { |
93 | 93 | if ($transform === true) { |
94 | - $transformViewReferenceFn = function ($parentViewReference) use (&$transformViewReferenceFn, $keepChildren) { |
|
94 | + $transformViewReferenceFn = function($parentViewReference) use (&$transformViewReferenceFn, $keepChildren) { |
|
95 | 95 | $transformer = ViewReferenceXmlCacheRepository::findTransformerFromXmlElement($parentViewReference); |
96 | 96 | $reference = $transformer->transform($parentViewReference); |
97 | 97 | if ($keepChildren) { |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | { |
126 | 126 | $viewsReferences = []; |
127 | 127 | |
128 | - $prefixFn = function ($depth, $char0 = '└', $char = '─') { |
|
128 | + $prefixFn = function($depth, $char0 = '└', $char = '─') { |
|
129 | 129 | $prefix = $char0; |
130 | 130 | for ($i = 0; $i <= $depth; $i++) { |
131 | 131 | $prefix .= $char; |