protected function _setEmailSingle($varName, $email, $name, $throwMessage)
    {
        if ($email === []) {
            $this->{$varName} = $email;

            return $this;
        }

        $current = $this->{$varName};
        $this->_setEmail($varName, $email, $name);
        if (count($this->{$varName}) !== 1) {
            $this->{$varName} = $current;
            throw new InvalidArgumentException($throwMessage);
        }

        return $this;
    }
protected function _setEmailSingle($varName, $email, $name, $throwMessage)
    {
        if ($email === []) {
            $this->{$varName} = $email;

            return $this;
        }

        $current = $this->{$varName};
        $this->_setEmail($varName, $email, $name);
        if (count($this->{$varName}) !== 1) {
            $this->{$varName} = $current;
            throw new InvalidArgumentException($throwMessage);
        }

        return $this;
    }
protected function _setEmailSingle ( $ varName , $ email , $ name , $ throwMessage ) { if ( $ email === [ ] ) { $ this -> { $ varName } = $ email ; return $ this ; } $ current = $ this -> { $ varName } ; $ this -> _setEmail ( $ varName , $ email , $ name ) ; if ( count ( $ this -> { $ varName } ) !== 1 ) { $ this -> { $ varName } = $ current ; throw new InvalidArgumentException ( $ throwMessage ) ; } return $ this ; }
Set only 1 email

@param string $varName Property name
@param string|array $email String with email,
Array with email as key, name as value or email as value (without name)
@param string $name Name
@param string $throwMessage Exception message
@return $this
@throws \InvalidArgumentException
Set only 1 email