Exception message fix for array properties

This commit is contained in:
Ivan Pidikseev 2020-04-16 14:24:25 +03:00
parent ab014fe032
commit 2ae2e008fe

View File

@ -32,7 +32,7 @@ class ArrayPropertyDescriber implements PropertyDescriberInterface, ModelRegistr
{
$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));
throw new \LogicException(sprintf('Property "%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"))`.', $property->getTitle()));
}
$property->setType('array');