public function setContentType(string $contentType, string $contentCharset = null): self
    {
        $this->contentType = $contentType;

        if ($contentCharset !== null) {
            $this->setContentCharset($contentCharset);
        }

        return $this;
    }
public function setContentType(string $contentType, string $contentCharset = null): self
    {
        $this->contentType = $contentType;

        if ($contentCharset !== null) {
            $this->setContentCharset($contentCharset);
        }

        return $this;
    }
public function setContentType ( string $ contentType , string $ contentCharset = null ) : self { $ this -> contentType = $ contentType ; if ( $ contentCharset !== null ) { $ this -> setContentCharset ( $ contentCharset ) ; } return $ this ; }
Set content type.
@param  string      $contentType
@param  string|null $contentCharset
@return self
Set content type .