getValue(); } elseif ($p instanceof QuotedLiteralPart && $p->getValue() !== '') { return '"' . \preg_replace('/(["\\\])/', '\\\$1', $p->getValue()) . '"'; } return \preg_replace('/\s+/', '', $p->getValue()); }, $parts )); } /** * Returns the email address. * * @return string The email address. */ public function getEmail() : string { return $this->value; } protected function validate() : void { if (empty($this->value)) { $this->addError('Address doesn\'t contain an email address', LogLevel::ERROR); } } }