mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Fix #147
This commit is contained in:
parent
c8a0115040
commit
dee44ee2e1
@ -90,10 +90,12 @@ class FormTypeParser implements ParserInterface
|
||||
for ($type = $config->getType(); null !== $type; $type = $type->getParent()) {
|
||||
if (isset($this->mapTypes[$type->getName()])) {
|
||||
$bestType = $this->mapTypes[$type->getName()];
|
||||
} elseif ('collection' === $type->getName() && isset($this->mapTypes[$config->getOption('type')])) {
|
||||
} elseif ('collection' === $type->getName()) {
|
||||
if (is_string($config->getOption('type')) && isset($this->mapTypes[$config->getOption('type')])) {
|
||||
$bestType = sprintf('array of %ss', $this->mapTypes[$config->getOption('type')]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ('' === $bestType) {
|
||||
if ($type = $config->getType()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user