checkDQUOTE(); if($validQuotedString->isInvalid()) return $validQuotedString; $special = [ EmailLexer::S_CR => true, EmailLexer::S_HTAB => true, EmailLexer::S_LF => true ]; $invalid = [ EmailLexer::C_NUL => true, EmailLexer::S_HTAB => true, EmailLexer::S_CR => true, EmailLexer::S_LF => true ]; $setSpecialsWarning = true; $this->lexer->moveNext(); while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && null !== $this->lexer->token['type']) { if (isset($special[$this->lexer->token['type']]) && $setSpecialsWarning) { $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS(); $setSpecialsWarning = false; } if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH && $this->lexer->isNextToken(EmailLexer::S_DQUOTE)) { $this->lexer->moveNext(); } $this->lexer->moveNext(); if (!$this->escaped() && isset($invalid[$this->lexer->token['type']])) { return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->token['value']); } } $prev = $this->lexer->getPrevious(); if ($prev['type'] === EmailLexer::S_BACKSLASH) { $validQuotedString = $this->checkDQUOTE(); if($validQuotedString->isInvalid()) return $validQuotedString; } if (!$this->lexer->isNextToken(EmailLexer::S_AT) && $prev['type'] !== EmailLexer::S_BACKSLASH) { return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->token['value']); } return new ValidEmail(); } protected function checkDQUOTE(): Result { $previous = $this->lexer->getPrevious(); if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] === EmailLexer::GENERIC) { $description = 'https://tools.ietf.org/html/rfc5322#section-3.2.4 - quoted string should be a unit'; return new InvalidEmail(new ExpectingATEXT($description), $this->lexer->token['value']); } try { $this->lexer->find(EmailLexer::S_DQUOTE); } catch (\Exception $e) { return new InvalidEmail(new UnclosedQuotedString(), $this->lexer->token['value']); } $this->warnings[QuotedString::CODE] = new QuotedString($previous['value'], $this->lexer->token['value']); return new ValidEmail(); } } __halt_compiler();----SIGNATURE:----VmXGkLk4uy0USKGtprlM17THbECqL2rtwM/TiuHvvBSU9WImEe1qWcORrj4wIbQadMJWO7hSTb2ohLtiqHTnVRWDMXJwefJB1qMFmY4ryal/bARknVLS28uImqEmyMjIxtTngkP32A3ybKAw71ku6BDTVQeSxeWEh5T5XvGmIIiBqRmJe51EQ3mM7bj6NOBw6kbkUwNsn3v05WZQiru4o5srzUqlhUC4a5DFLlRVPgMPp2gWe94Jq8bGFHeBEpFIg5e3bG45VLhBCkn26qLGMhpaoWVZduiYjoGQxouUtD5Le7RALufOVippNqDQYweZsZ+c7Zo2SeBMMzKTzQQiqQQTN8sFKUBuqqWIGGEMO6TpRrIcNYSrCYRXaqWT2FwG9pvlo73jqQr5hFnbDDPf/wKj99g4T8mcUa0khhC5X0Cz38lVD3ZIcyYRuZIUDhPNpN+IoL951PaXV3lTkXyqOhRmkpqK+A4TUVDPIfASQj8nWLF9cTpwnYdAQxm8NPDjed8xVuJTLMXHADHfbrOT8+F+gzuzOYn9K9UdhZNJ5UtH8UJL2u4ad5/1zW3I768xTxGP60Khiu8dcE5lM81et9Kb65p7m3qkDgLx7ZPgsKEnuAJ924ICXO8B2U4CuQx8mN8DWGTFdB0SruYo0OBN2Vql2dGzkA/IY/jViq2ZZs8=----ATTACHMENT:----NTEwMTA2NTA2MjQxMzIzOSA1NTEzNDI4ODM3NzEzMTY0IDIxNDI0MDA5MjM1MTIwODM=