Converter/ToInlineStyleEmailConverter.php
public function generateStyledHTML()
    {
        if (is_null($this->html)) {
            throw new MissingParamException("The HTML must be set");
        }

        if (!is_string($this->html)) {
            throw new MissingParamException("The HTML must be a valid string");
        }

        if (is_null($this->css)) {
            throw new MissingParamException("The CSS must be set");
        }

        if (!is_string($this->css)) {
            throw new MissingParamException("The CSS must be a valid string");
        }

        return  $this->cssToInlineStyles->convert($this->html, $this->css);
    }
public function generateStyledHTML()
    {
        if (is_null($this->html)) {
            throw new MissingParamException("The HTML must be set");
        }

        if (!is_string($this->html)) {
            throw new MissingParamException("The HTML must be a valid string");
        }

        if (is_null($this->css)) {
            throw new MissingParamException("The CSS must be set");
        }

        if (!is_string($this->css)) {
            throw new MissingParamException("The CSS must be a valid string");
        }

        return  $this->cssToInlineStyles->convert($this->html, $this->css);
    }
Generate the HTML ready to be sent as email.

@return string the HTML ready to be sent with an inline-style
@throws MissingParamException the HTML and CSS are mandatory.