src/Phrase.php
public function getCamelCase(bool $upperCamelCase = true, int $acronymMaxLength = null): string
    {
        $phrase = '';

        // Combine letters to make sure acronym max length is preserved.

        foreach ($this->words as $word) {
            if (!$upperCamelCase) {
                $phrase .= $word->getCapitalCase();
                $upperCamelCase = true;
                continue;
            }

            $phrase .= $word->getCapitalCase();
        }

        return $phrase;
    }
public function getCamelCase(bool $upperCamelCase = true, int $acronymMaxLength = null): string
    {
        $phrase = '';

        // Combine letters to make sure acronym max length is preserved.

        foreach ($this->words as $word) {
            if (!$upperCamelCase) {
                $phrase .= $word->getCapitalCase();
                $upperCamelCase = true;
                continue;
            }

            $phrase .= $word->getCapitalCase();
        }

        return $phrase;
    }
public function getCamelCase ( bool $ upperCamelCase = true , int $ acronymMaxLength = null ) : string { $ phrase = '' ; // Combine letters to make sure acronym max length is preserved. foreach ( $ this -> words as $ word ) { if ( ! $ upperCamelCase ) { $ phrase .= $ word -> getCapitalCase ( ) ; $ upperCamelCase = true ; continue ; } $ phrase .= $ word -> getCapitalCase ( ) ; } return $ phrase ; }
Returns the phrase as camel case.

@TODO: Finish acroynm length system.

@param bool $upperCamelCase True if the first _word_ should be capitalized.
@param int|null $acronymMaxLength If set, acronyms will be all capitalized up to a specific length.
@return string The camel cased version of the phrase.
Returns the phrase as camel case .