addLongEmailWarning example

protected $idLeft = '';

    /** * @var string */
    protected $idRight = '';

    public function parse(string $str): Result
    {
        $result = parent::parse($str);

        $this->addLongEmailWarning($this->idLeft, $this->idRight);

        return $result;
    }

    protected function preLeftParsing(): Result
    {
        if (!$this->hasAtToken()) {
            return new InvalidEmail(new NoLocalPart()$this->lexer->current->value);
        }
        return new ValidEmail();
    }

    
protected $domainPart = '';

    /** * @var string */
    protected $localPart = '';

    public function parse(string $str): Result
    {
        $result = parent::parse($str);

        $this->addLongEmailWarning($this->localPart, $this->domainPart);

        return $result;
    }

    protected function preLeftParsing(): Result
    {
        if (!$this->hasAtToken()) {
            return new InvalidEmail(new NoLocalPart()$this->lexer->current->value);
        }
        return new ValidEmail();
    }

    
Home | Imprint | This part of the site doesn't use cookies.