mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +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();
|
$choices = array();
|
||||||
foreach (array($choiceList->getPreferredViews(), $choiceList->getRemainingViews()) as $viewList) {
|
foreach (array($choiceList->getPreferredViews(), $choiceList->getRemainingViews()) as $viewList) {
|
||||||
$choices = array_merge($choices, $this->handleChoiceViewsHierarchy($viewList));
|
$choices = array_merge($choices, $this->handleChoiceViewsHierarchy($viewList));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $choices;
|
return $choices;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function handleChoiceViewsHierarchy(array $choiceViews) {
|
private function handleChoiceViewsHierarchy(array $choiceViews)
|
||||||
|
{
|
||||||
$choices = array();
|
$choices = array();
|
||||||
foreach ($choiceViews as $item) {
|
foreach ($choiceViews as $item) {
|
||||||
if ($item instanceof ChoiceView) {
|
if ($item instanceof ChoiceView) {
|
||||||
@ -240,6 +243,7 @@ class FormTypeParser implements ParserInterface
|
|||||||
$choices = array_merge($choices, $this->handleChoiceViewsHierarchy($item));
|
$choices = array_merge($choices, $this->handleChoiceViewsHierarchy($item));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $choices;
|
return $choices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
namespace Nelmio\ApiDocBundle\Tests\Fixtures\Form;
|
namespace Nelmio\ApiDocBundle\Tests\Fixtures\Form;
|
||||||
|
|
||||||
|
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList;
|
use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
@ -53,4 +52,3 @@ class ImprovedTestType extends AbstractType
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,4 +148,4 @@ test_route_private:
|
|||||||
|
|
||||||
test_route_exclusive:
|
test_route_exclusive:
|
||||||
pattern: /exclusive
|
pattern: /exclusive
|
||||||
defaults: { _controller: NelmioApiDocTestBundle:Test:exclusive }
|
defaults: { _controller: NelmioApiDocTestBundle:Test:exclusive }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user