Skip to content

Commit

Permalink
fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed May 16, 2014
1 parent a88e7d8 commit fa92011
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 6 additions & 2 deletions Parser/FormTypeParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -240,6 +243,7 @@ private function handleChoiceViewsHierarchy(array $choiceViews) {
$choices = array_merge($choices, $this->handleChoiceViewsHierarchy($item));
}
}

return $choices;
}
}
2 changes: 0 additions & 2 deletions Tests/Fixtures/Form/ImprovedTestType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -53,4 +52,3 @@ public function getName()
return '';
}
}

2 changes: 1 addition & 1 deletion Tests/Fixtures/app/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ test_route_private:

test_route_exclusive:
pattern: /exclusive
defaults: { _controller: NelmioApiDocTestBundle:Test:exclusive }
defaults: { _controller: NelmioApiDocTestBundle:Test:exclusive }

0 comments on commit fa92011

Please sign in to comment.