[Mime] fix bad method call on "EmailAddressContains"

There is no method `Address` on `MailboxHeader`, but a method `getAddress`.
This commit is contained in:
Hugo Alliaume 2020-05-08 10:53:06 +02:00
parent 5c24718b1e
commit 227ebd2fe9
No known key found for this signature in database
GPG Key ID: F7CA74D48C86B47D
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ final class EmailAddressContains extends Constraint
$header = $message->getHeaders()->get($this->headerName);
if ($header instanceof MailboxHeader) {
return $this->expectedValue === $header->Address()->getAddress();
return $this->expectedValue === $header->getAddress()->getAddress();
} elseif ($header instanceof MailboxListHeader) {
foreach ($header->getAddresses() as $address) {
if ($this->expectedValue === $address->getAddress()) {