propertyDescribers = $propertyDescribers; } public function describe(Type $type, Schema $property, array $groups) { $type = $type->getCollectionValueType(); if (null === $type) { throw new \LogicException(sprintf('Property "%s:%s" is an array, but its items type isn\'t specified. You can specify that by using the type `string[]` for instance or `@SWG\Property(type="array", @SWG\Items(type="string"))`.', $class, $propertyName)); } $property->setType('array'); $property = $property->getItems(); foreach ($this->propertyDescribers as $propertyDescriber) { if ($propertyDescriber instanceof ModelRegistryAwareInterface) { $propertyDescriber->setModelRegistry($this->modelRegistry); } if ($propertyDescriber->supports($type)) { $propertyDescriber->describe($type, $property); break; } } } public function supports(Type $type): bool { return $type->isCollection(); } }