Skip to content

Commit

Permalink
Nullable patterns no longer throw exceptions (#1210)
Browse files Browse the repository at this point in the history
Nullable patterns no longer throw exceptions
  • Loading branch information
martijnvankempen authored and dbu committed Jan 26, 2018
1 parent 819cbe3 commit dad7f77
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,12 @@ private function updateSchemaDefinitionWithRequiredProperty(ReflectionProperty $
/**
* 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 {
Expand Down

0 comments on commit dad7f77

Please sign in to comment.