芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/xmintal-back/vendor/egulias/email-validator/src/Parser.php
lexer = $lexer; } public function parse(string $str) : Result { $this->lexer->setInput($str); if ($this->lexer->hasInvalidTokens()) { return new InvalidEmail(new ExpectingATEXT("Invalid tokens found"), $this->lexer->token["value"]); } $preParsingResult = $this->preLeftParsing(); if ($preParsingResult->isInvalid()) { return $preParsingResult; } $localPartResult = $this->parseLeftFromAt(); if ($localPartResult->isInvalid()) { return $localPartResult; } $domainPartResult = $this->parseRightFromAt(); if ($domainPartResult->isInvalid()) { return $domainPartResult; } return new ValidEmail(); } /** * @return Warning\Warning[] */ public function getWarnings() : array { return $this->warnings; } protected function hasAtToken() : bool { $this->lexer->moveNext(); $this->lexer->moveNext(); return ((array) $this->lexer->token)['type'] !== EmailLexer::S_AT; } }