original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Define a valid en-ending as a non-vowel, and not gem.
  @param string $ending
  @return boolean
docstring_tokens: Define a valid en - ending as a non - vowel and not gem .