fixed CSC
This commit is contained in:
parent
8c2e128a1a
commit
3051c59eff
@ -115,9 +115,11 @@ final class Address
|
||||
if (false === strpos($string, '<')) {
|
||||
return new self($string, '');
|
||||
}
|
||||
|
||||
if (!preg_match(self::FROM_STRING_PATTERN, $string, $matches)) {
|
||||
throw new InvalidArgumentException(sprintf('Could not parse "%s" to a "%s" instance.', $string, static::class));
|
||||
}
|
||||
|
||||
return new self($matches['addrSpec'], trim($matches['displayName'], ' \'"'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user