private function hasValidEnEnding($word)
    {
        $lastLetter = Utf8::substr($word, -1, 1);
        if (in_array($lastLetter, self::$vowels)) {
            return false;
        }

        $threeLastLetters = Utf8::substr($word, -3, 3);
        if ($threeLastLetters == 'gem') {
            return false;
        }
        return true;
    }
private function hasValidEnEnding($word)
    {
        $lastLetter = Utf8::substr($word, -1, 1);
        if (in_array($lastLetter, self::$vowels)) {
            return false;
        }

        $threeLastLetters = Utf8::substr($word, -3, 3);
        if ($threeLastLetters == 'gem') {
            return false;
        }
        return true;
    }
private function hasValidEnEnding ( $ word ) { $ lastLetter = Utf8 :: substr ( $ word , - 1 , 1 ) ; if ( in_array ( $ lastLetter , self :: $ vowels ) ) { return false ; } $ threeLastLetters = Utf8 :: substr ( $ word , - 3 , 3 ) ; if ( $ threeLastLetters == 'gem' ) { return false ; } return true ; }
Define a valid en-ending as a non-vowel, and not gem.
@param string $ending
@return boolean
Define a valid en - ending as a non - vowel and not gem .