mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-10 03:29:25 +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.
|
* 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()) {
|
if (null !== $property->getPattern()) {
|
||||||
$property->setPattern(sprintf('%s, %s', $property->getPattern(), $newPattern));
|
$property->setPattern(sprintf('%s, %s', $property->getPattern(), $newPattern));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user