Completed
Pull Request — 2.3 (#1134)
by Leny
07:16 queued 03:35
created
Bundle/WidgetMapBundle/Warmer/WidgetDataWarmer.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
                     $associatedEntitiesToWarm = $groupedAssociatedEntitiesToWarm['entitiesToWarm'];
208 208
 
209 209
                     //Extract ids to search
210
-                    $idsToSearch = array_map(function ($associatedEntityToWarm) {
210
+                    $idsToSearch = array_map(function($associatedEntityToWarm) {
211 211
                         return $associatedEntityToWarm->getEntityId();
212 212
                     }, $associatedEntitiesToWarm);
213 213
 
Please login to merge, or discard this patch.
Tests/Features/Context/MinkContext.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Bundle/WidgetBundle/Command/CreateWidgetCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                     }
Please login to merge, or discard this patch.
Bundle/CoreBundle/Form/EntityProxyFormType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
                 'attr'        => [
52 52
                     'class' => 'add_'.$options['business_entity_id'].'_link picker_entity_select',
53 53
                 ],
54
-                'query_builder' => function (EntityRepository $er) use ($options, $locale) {
54
+                'query_builder' => function(EntityRepository $er) use ($options, $locale) {
55 55
                     // Don't display entities that don't have translations in the current locale.
56 56
                     if (in_array(Translatable::class, class_uses($options['namespace']))) {
57 57
                         return $er->createQueryBuilder('entity')
Please login to merge, or discard this patch.
Bundle/MediaBundle/Form/FolderType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
             ->add('name')
39 39
             ->add('rel', ChoiceType::class, ['choices' => ['media', 'image', 'slideshow', 'video']])
40 40
             ->add('parent', EntityType::class, ['class' => 'Victoire\Bundle\MediaBundle\Entity\Folder', 'required' => false,
41
-                'query_builder'                         => function (\Doctrine\ORM\EntityRepository $er) use ($folder, $type) {
41
+                'query_builder'                         => function(\Doctrine\ORM\EntityRepository $er) use ($folder, $type) {
42 42
                     $qb = $er->createQueryBuilder('folder');
43 43
 
44 44
                     if ($folder != null && $folder->getId() != null) {
Please login to merge, or discard this patch.
Bundle/CriteriaBundle/DataSource/RequestDataSource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             'options' => [
43 43
                 'choices'           => $this->availableLocales,
44 44
                 'choices_as_values' => true,
45
-                'choice_label'      => function ($value) {
45
+                'choice_label'      => function($value) {
46 46
                     return $value;
47 47
                 },
48 48
             ],
Please login to merge, or discard this patch.
Bundle/CriteriaBundle/DataSource/DomainNameDataSource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
             'options' => [
60 60
                 'choices'           => $this->getDomainName(),
61 61
                 'choices_as_values' => true,
62
-                'choice_label'      => function ($value) {
62
+                'choice_label'      => function($value) {
63 63
                     return $value;
64 64
                 },
65 65
             ],
Please login to merge, or discard this patch.
Bundle/CriteriaBundle/Form/Type/CriteriaType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
         $builder->addEventListener(
26 26
             FormEvents::PRE_SET_DATA,
27
-            function (FormEvent $event) use ($options) {
27
+            function(FormEvent $event) use ($options) {
28 28
                 //we get the raw data for the widget form
29 29
                 $name = $event->getData()->getName();
30 30
                 $formParams = $options['dataSources']->getDataSource($name)->{$options['dataSources']->getDataSourceParameters($name)['method'].'FormParams'}();
Please login to merge, or discard this patch.
Bundle/CoreBundle/Command/WidgetCssGenerateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
             ->getQuery()
119 119
             ->getResult();
120 120
         $templates = [];
121
-        $recursiveGetTemplates = function ($template) use (&$recursiveGetTemplates, &$templates) {
121
+        $recursiveGetTemplates = function($template) use (&$recursiveGetTemplates, &$templates) {
122 122
             array_push($templates, $template);
123 123
             foreach ($template->getInheritors() as $_template) {
124 124
                 if ($_template instanceof Template) {
Please login to merge, or discard this patch.