From fa920111260e350ea17942c77c811762e965cbdc Mon Sep 17 00:00:00 2001 From: William DURAND Date: Fri, 16 May 2014 11:33:58 +0200 Subject: [PATCH] fix cs --- Parser/FormTypeParser.php | 8 ++++++-- Tests/Fixtures/Form/ImprovedTestType.php | 2 -- Tests/Fixtures/app/config/routing.yml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Parser/FormTypeParser.php b/Parser/FormTypeParser.php index be98b10e1..c87166c1e 100644 --- a/Parser/FormTypeParser.php +++ b/Parser/FormTypeParser.php @@ -223,15 +223,18 @@ private function createForm($item) } } - private function handleChoiceListValues(ChoiceListInterface $choiceList) { + private function handleChoiceListValues(ChoiceListInterface $choiceList) + { $choices = array(); foreach (array($choiceList->getPreferredViews(), $choiceList->getRemainingViews()) as $viewList) { $choices = array_merge($choices, $this->handleChoiceViewsHierarchy($viewList)); } + return $choices; } - private function handleChoiceViewsHierarchy(array $choiceViews) { + private function handleChoiceViewsHierarchy(array $choiceViews) + { $choices = array(); foreach ($choiceViews as $item) { if ($item instanceof ChoiceView) { @@ -240,6 +243,7 @@ private function handleChoiceViewsHierarchy(array $choiceViews) { $choices = array_merge($choices, $this->handleChoiceViewsHierarchy($item)); } } + return $choices; } } diff --git a/Tests/Fixtures/Form/ImprovedTestType.php b/Tests/Fixtures/Form/ImprovedTestType.php index 2ab477377..245b8dcde 100644 --- a/Tests/Fixtures/Form/ImprovedTestType.php +++ b/Tests/Fixtures/Form/ImprovedTestType.php @@ -8,7 +8,6 @@ namespace Nelmio\ApiDocBundle\Tests\Fixtures\Form; - use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList; use Symfony\Component\Form\FormBuilderInterface; @@ -53,4 +52,3 @@ public function getName() return ''; } } - diff --git a/Tests/Fixtures/app/config/routing.yml b/Tests/Fixtures/app/config/routing.yml index 370ae0da7..4ee5e5a3f 100644 --- a/Tests/Fixtures/app/config/routing.yml +++ b/Tests/Fixtures/app/config/routing.yml @@ -148,4 +148,4 @@ test_route_private: test_route_exclusive: pattern: /exclusive - defaults: { _controller: NelmioApiDocTestBundle:Test:exclusive } \ No newline at end of file + defaults: { _controller: NelmioApiDocTestBundle:Test:exclusive }