@@ -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) { |
@@ -86,6 +86,9 @@ |
||
86 | 86 | ); |
87 | 87 | } |
88 | 88 | |
89 | + /** |
|
90 | + * @param Widget $widget |
|
91 | + */ |
|
89 | 92 | private function generateHash($widget) |
90 | 93 | { |
91 | 94 | return sprintf('%s-%s-%s-%s', |
@@ -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([]) |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * WidgetCache constructor. |
23 | 23 | * |
24 | - * @param Client $cache |
|
24 | + * @param WidgetCache $cache |
|
25 | 25 | */ |
26 | 26 | public function __construct(WidgetCache $cache) |
27 | 27 | { |
@@ -29,7 +29,6 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
32 | - * @param Widget $widget |
|
33 | 32 | * |
34 | 33 | * @return string |
35 | 34 | */ |
@@ -22,7 +22,6 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Construct. |
24 | 24 | * |
25 | - * @param EngineInterface $templating |
|
26 | 25 | * @param $victoireTwigResponsive |
27 | 26 | * @param $kernelRootDir |
28 | 27 | * |
@@ -39,7 +38,7 @@ discard block |
||
39 | 38 | /** |
40 | 39 | * Update css by removing old file and writing new file. |
41 | 40 | * |
42 | - * @param $oldHash |
|
41 | + * @param string $oldHash |
|
43 | 42 | * @param View $view |
44 | 43 | * @param array $widgets |
45 | 44 | */ |
@@ -169,7 +168,7 @@ discard block |
||
169 | 168 | * Write css file. |
170 | 169 | * |
171 | 170 | * @param $view |
172 | - * @param $css |
|
171 | + * @param string $css |
|
173 | 172 | */ |
174 | 173 | private function writeCssFile(View $view, $css) |
175 | 174 | { |
@@ -105,7 +105,7 @@ |
||
105 | 105 | * |
106 | 106 | * @param $linkType |
107 | 107 | * @param $locale |
108 | - * @param FormBuilderInterface|FormInterface $form |
|
108 | + * @param FormInterface $form |
|
109 | 109 | * @param FormBuilderInterface $builder |
110 | 110 | */ |
111 | 111 | protected function manageLinkTypeRelatedFields($linkType, $locale, $form, FormBuilderInterface $builder) |
@@ -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; |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Victoire\Bundle\PageBundle\EventSubscriber; |
4 | 4 | |
5 | 5 | use Doctrine\Common\EventSubscriber; |
6 | -use Doctrine\Common\Util\ClassUtils; |
|
7 | 6 | use Doctrine\ORM\EntityManager; |
8 | 7 | use Doctrine\ORM\Event\LifecycleEventArgs; |
9 | 8 | use Doctrine\ORM\Event\LoadClassMetadataEventArgs; |
@@ -34,7 +34,7 @@ |
||
34 | 34 | /** |
35 | 35 | * This method save a tree of viewReferences. |
36 | 36 | * |
37 | - * @param array $viewReferences |
|
37 | + * @param \Victoire\Bundle\CoreBundle\Entity\WebViewInterface[] $viewReferences |
|
38 | 38 | * @param string $parentId |
39 | 39 | * @param string $parentLocale |
40 | 40 | * @param bool $reset |