private function getRotatedCharacter($character, $rotationAmount)
    {
        $alphabetSize = $this->getAlphabetSize();

        $positionInAlphabet = mb_stripos(self::ALPHABET, $character);

        if (false === $positionInAlphabet) {
            $rotatedCharacter = $character;
        } else {
            $newCharacterOffset = (($positionInAlphabet + $rotationAmount + $alphabetSize) % $alphabetSize)
                - $positionInAlphabet;

            $rotatedCharacter = \chr(\ord($character) + $newCharacterOffset);
        }

        return $rotatedCharacter;
    }
private function getRotatedCharacter($character, $rotationAmount)
    {
        $alphabetSize = $this->getAlphabetSize();

        $positionInAlphabet = mb_stripos(self::ALPHABET, $character);

        if (false === $positionInAlphabet) {
            $rotatedCharacter = $character;
        } else {
            $newCharacterOffset = (($positionInAlphabet + $rotationAmount + $alphabetSize) % $alphabetSize)
                - $positionInAlphabet;

            $rotatedCharacter = \chr(\ord($character) + $newCharacterOffset);
        }

        return $rotatedCharacter;
    }
private function getRotatedCharacter ( $ character , $ rotationAmount ) { $ alphabetSize = $ this -> getAlphabetSize ( ) ; $ positionInAlphabet = mb_stripos ( self :: ALPHABET , $ character ) ; if ( false === $ positionInAlphabet ) { $ rotatedCharacter = $ character ; } else { $ newCharacterOffset = ( ( $ positionInAlphabet + $ rotationAmount + $ alphabetSize ) % $ alphabetSize ) - $ positionInAlphabet ; $ rotatedCharacter = \ chr ( \ ord ( $ character ) + $ newCharacterOffset ) ; } return $ rotatedCharacter ; }
Get rotated character.

@param string $character
@param int    $rotationAmount

@return string
Get rotated character .