mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
fix cs
This commit is contained in:
parent
a88e7d8278
commit
fa92011126
@ -223,15 +223,18 @@ class FormTypeParser implements ParserInterface
|
||||
}
|
||||
}
|
||||
|
||||
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 @@ class FormTypeParser implements ParserInterface
|
||||
$choices = array_merge($choices, $this->handleChoiceViewsHierarchy($item));
|
||||
}
|
||||
}
|
||||
|
||||
return $choices;
|
||||
}
|
||||
}
|
||||
|
@ -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 @@ class ImprovedTestType extends AbstractType
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,4 +148,4 @@ test_route_private:
|
||||
|
||||
test_route_exclusive:
|
||||
pattern: /exclusive
|
||||
defaults: { _controller: NelmioApiDocTestBundle:Test:exclusive }
|
||||
defaults: { _controller: NelmioApiDocTestBundle:Test:exclusive }
|
||||
|
Loading…
x
Reference in New Issue
Block a user