private function step2()
    {
        if ( ($position = $this->search(array('e'))) !== false) {
            if ($this->inR1($position)) {
                $letter = Utf8::substr($this->word, -2, 1);
                if (!in_array($letter, self::$vowels)) {
                    $this->word = Utf8::substr($this->word, 0, $position);
                    $this->unDoubling();

                    return true;
                }
            }
        }

        return false;
    }
private function step2()
    {
        if ( ($position = $this->search(array('e'))) !== false) {
            if ($this->inR1($position)) {
                $letter = Utf8::substr($this->word, -2, 1);
                if (!in_array($letter, self::$vowels)) {
                    $this->word = Utf8::substr($this->word, 0, $position);
                    $this->unDoubling();

                    return true;
                }
            }
        }

        return false;
    }
private function step2 ( ) { if ( ( $ position = $ this -> search ( array ( 'e' ) ) ) !== false ) { if ( $ this -> inR1 ( $ position ) ) { $ letter = Utf8 :: substr ( $ this -> word , - 2 , 1 ) ; if ( ! in_array ( $ letter , self :: $ vowels ) ) { $ this -> word = Utf8 :: substr ( $ this -> word , 0 , $ position ) ; $ this -> unDoubling ( ) ; return true ; } } } return false ; }
Step 2
Delete suffix e if in R1 and preceded by a non-vowel, and then undouble the ending
Step 2 Delete suffix e if in R1 and preceded by a non - vowel and then undouble the ending