@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | * |
131 | 131 | * @param $linkType |
132 | 132 | * @param $locale |
133 | - * @param FormBuilderInterface|FormInterface $form |
|
133 | + * @param FormInterface $form |
|
134 | 134 | * @param FormBuilderInterface $builder |
135 | 135 | * @param array $options |
136 | 136 | */ |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | * Add the types related to the target value. |
203 | 203 | * |
204 | 204 | * @param string $target |
205 | - * @param FormBuilderInterface|FormInterface $form |
|
205 | + * @param FormInterface $form |
|
206 | 206 | * @param array $options |
207 | 207 | */ |
208 | 208 | protected function manageTargetRelatedFields($target, $form, $options) |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | 'choices' => $options['linkTypeChoices'], |
65 | 65 | 'choices_as_values' => true, |
66 | 66 | ]) |
67 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($builder, $options) { |
|
67 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($builder, $options) { |
|
68 | 68 | /** @var Link $data */ |
69 | 69 | $data = $event->getData(); |
70 | 70 | $form = $event->getForm(); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | }); |
75 | 75 | |
76 | 76 | $builder |
77 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($builder, $options) { |
|
77 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($builder, $options) { |
|
78 | 78 | $form = $event->getForm(); |
79 | 79 | $data = $event->getData(); |
80 | 80 | $locale = isset($data['locale']) ? $data['locale'] : null; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | 'label' => 'form.link_type.target.modalLayouts.label', |
213 | 213 | 'required' => true, |
214 | 214 | 'choices' => $this->modalLayouts, |
215 | - 'choice_label' => function ($value, $key, $index) { |
|
215 | + 'choice_label' => function($value, $key, $index) { |
|
216 | 216 | return 'form.link_type.target.modalLayouts.choices.'.$value; |
217 | 217 | }, |
218 | 218 | 'choices_as_values' => true, |
@@ -108,11 +108,11 @@ discard block |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
111 | - * @param $link |
|
111 | + * @param string $link |
|
112 | 112 | * |
113 | 113 | * @throws VideoException |
114 | 114 | * |
115 | - * @return mixed |
|
115 | + * @return string|null |
|
116 | 116 | */ |
117 | 117 | public function isolateVimeoVideoCode($link) |
118 | 118 | { |
@@ -126,11 +126,11 @@ discard block |
||
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
129 | - * @param $link |
|
129 | + * @param string $link |
|
130 | 130 | * |
131 | 131 | * @throws VideoException |
132 | 132 | * |
133 | - * @return mixed |
|
133 | + * @return string|null |
|
134 | 134 | */ |
135 | 135 | public function isolateYoutubeVideoCode($link) |
136 | 136 | { |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
147 | - * @param $link |
|
147 | + * @param string $link |
|
148 | 148 | * |
149 | 149 | * @throws VideoException |
150 | 150 | * |
@@ -182,6 +182,9 @@ |
||
182 | 182 | return PropertyAccess::createPropertyAccessor()->getValue($this->translate($currentLocale, false), 'getUrl'); |
183 | 183 | } |
184 | 184 | |
185 | + /** |
|
186 | + * @param string $name |
|
187 | + */ |
|
185 | 188 | public function setUrl($name, $locale = null) |
186 | 189 | { |
187 | 190 | $this->translate($locale)->setUrl($name); |
@@ -140,7 +140,7 @@ |
||
140 | 140 | * Create a $slot array that'll contain, for each slot, a widgetmap id as key and a widgetmap as value |
141 | 141 | * Do not keeps widgetMaps that are overwrited. |
142 | 142 | * |
143 | - * @param $widgetMaps |
|
143 | + * @param WidgetMap[] $widgetMaps |
|
144 | 144 | * |
145 | 145 | * @return array |
146 | 146 | */ |
@@ -30,7 +30,7 @@ |
||
30 | 30 | * |
31 | 31 | * @throws \Exception |
32 | 32 | * |
33 | - * @return bool |
|
33 | + * @return boolean|null |
|
34 | 34 | */ |
35 | 35 | protected function execute(InputInterface $input, OutputInterface $output) |
36 | 36 | { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * Inject Widgets in View's builtWidgetMap. |
73 | 73 | * |
74 | 74 | * @param View $view |
75 | - * @param $viewWidgets |
|
75 | + * @param Widget[] $viewWidgets |
|
76 | 76 | */ |
77 | 77 | private function injectWidgets(View $view, $viewWidgets) |
78 | 78 | { |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | * @throws \Throwable |
184 | 184 | * @throws \TypeError |
185 | 185 | * |
186 | - * @return array |
|
186 | + * @return Widget[] |
|
187 | 187 | */ |
188 | 188 | private function setAssociatedEntities(array $repositories) |
189 | 189 | { |
@@ -193,7 +193,7 @@ |
||
193 | 193 | foreach ($findMethods as $findMethod => $associatedEntitiesToWarm) { |
194 | 194 | |
195 | 195 | //Extract ids to search |
196 | - $idsToSearch = array_map(function ($associatedEntityToWarm) { |
|
196 | + $idsToSearch = array_map(function($associatedEntityToWarm) { |
|
197 | 197 | return $associatedEntityToWarm->getEntityId(); |
198 | 198 | }, $associatedEntitiesToWarm); |
199 | 199 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | |
69 | 69 | /** |
70 | 70 | * @param Element $page |
71 | - * @param float|int $timeout |
|
71 | + * @param integer $timeout |
|
72 | 72 | */ |
73 | 73 | public function assertPageAddress($page, $timeout = 10000) |
74 | 74 | { |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | ]); |
239 | 239 | |
240 | 240 | $question = new Question($questionHelper->getQuestion('Widget name', $input->getOption('bundle-name'))); |
241 | - $question->setValidator(function ($answer) { |
|
241 | + $question->setValidator(function($answer) { |
|
242 | 242 | return self::validateWidgetName($answer, false); |
243 | 243 | }); |
244 | 244 | |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | ]); |
286 | 286 | |
287 | 287 | $question = new Question($questionHelper->getQuestion('Parent widget name', false)); |
288 | - $question->setValidator(function ($answer) { |
|
288 | + $question->setValidator(function($answer) { |
|
289 | 289 | return self::validateWidgetName($answer, false); |
290 | 290 | }); |
291 | 291 | $parent = $questionHelper->ask($input, $output, $question); |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | ]); |
311 | 311 | |
312 | 312 | $question = new Question($questionHelper->getQuestion('Target directory', $dir), $dir); |
313 | - $question->setValidator(function ($dir) use ($bundle, $namespace) { |
|
313 | + $question->setValidator(function($dir) use ($bundle, $namespace) { |
|
314 | 314 | return Validators::validateTargetDir($dir, $bundle, $namespace); |
315 | 315 | }); |
316 | 316 | $dir = $questionHelper->ask($input, $output, $question); |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | } |
487 | 487 | $output->writeln(''); |
488 | 488 | |
489 | - $fieldValidator = function ($type) use ($types) { |
|
489 | + $fieldValidator = function($type) use ($types) { |
|
490 | 490 | if (!in_array($type, $types)) { |
491 | 491 | throw new \InvalidArgumentException(sprintf('Invalid type "%s".', $type)); |
492 | 492 | } |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | return $type; |
495 | 495 | }; |
496 | 496 | |
497 | - $lengthValidator = function ($length) { |
|
497 | + $lengthValidator = function($length) { |
|
498 | 498 | if (!$length) { |
499 | 499 | return $length; |
500 | 500 | } |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | |
517 | 517 | $question = new Question($questionHelper->getQuestion('New field name (press <return> to stop adding fields)', null)); |
518 | 518 | $question->setValidator( |
519 | - function ($name) use ($fields, $generator) { |
|
519 | + function($name) use ($fields, $generator) { |
|
520 | 520 | if (isset($fields[$name]) || 'id' == $name) { |
521 | 521 | throw new \InvalidArgumentException(sprintf('Field "%s" is already defined.', $name)); |
522 | 522 | } |
@@ -89,7 +89,7 @@ |
||
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 | if (!empty($viewReference[0])) { |