mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 23:59:26 +03:00
Nullable patterns no longer throw exceptions (#1210)
Nullable patterns no longer throw exceptions
This commit is contained in:
parent
819cbe354f
commit
dad7f77351
@ -104,8 +104,12 @@ class SymfonyConstraintAnnotationReader
|
||||
/**
|
||||
* Append the pattern from the constraint to the existing pattern.
|
||||
*/
|
||||
private function appendPattern(Schema $property, string $newPattern)
|
||||
private function appendPattern(Schema $property, $newPattern)
|
||||
{
|
||||
if (null === $newPattern) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (null !== $property->getPattern()) {
|
||||
$property->setPattern(sprintf('%s, %s', $property->getPattern(), $newPattern));
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user