src/TextFormatter.php
public function convertTitle()
    {
        if ($this->title === null) {
            return '';
        }

        foreach ($this->splitWords() as $index => $word) {
            if ($this->wordShouldBeUppercase($index, $word)) {
                $this->rebuildTitle($index, $this->uppercaseWord($word));
            }
        }

        return $this->title;
    }
public function convertTitle()
    {
        if ($this->title === null) {
            return '';
        }

        foreach ($this->splitWords() as $index => $word) {
            if ($this->wordShouldBeUppercase($index, $word)) {
                $this->rebuildTitle($index, $this->uppercaseWord($word));
            }
        }

        return $this->title;
    }
public function convertTitle ( ) { if ( $ this -> title === null ) { return '' ; } foreach ( $ this -> splitWords ( ) as $ index => $ word ) { if ( $ this -> wordShouldBeUppercase ( $ index , $ word ) ) { $ this -> rebuildTitle ( $ index , $ this -> uppercaseWord ( $ word ) ) ; } } return $ this -> title ; }
Converts the initial title to a correctly formatted one

@return string
Converts the initial title to a correctly formatted one