src/TextFormatter.php
protected function setTitle($title)
    {
        $title = trim(preg_replace('/\s\s+/', ' ', str_replace("\n", " ", $title)));

        if ($title != '') {
            $this->title = $title;
        }
    }
protected function setTitle($title)
    {
        $title = trim(preg_replace('/\s\s+/', ' ', str_replace("\n", " ", $title)));

        if ($title != '') {
            $this->title = $title;
        }
    }
protected function setTitle ( $ title ) { $ title = trim ( preg_replace ( '/\s\s+/' , ' ' , str_replace ( "\n" , " " , $ title ) ) ) ; if ( $ title != '' ) { $ this -> title = $ title ; } }
Sets the title after cleaning up extra spaces

@param string $title
Sets the title after cleaning up extra spaces