private function getValidRotationAmount($rotationAmount)
    {
        $rotationAmount = (int) $rotationAmount;

        $alphabetSize = $this->getAlphabetSize();

        if ($rotationAmount < 0) {
            $rotationAmount += (int) ceil(-1 * $rotationAmount / $alphabetSize) * $alphabetSize;
        }

        return $rotationAmount;
    }
private function getValidRotationAmount($rotationAmount)
    {
        $rotationAmount = (int) $rotationAmount;

        $alphabetSize = $this->getAlphabetSize();

        if ($rotationAmount < 0) {
            $rotationAmount += (int) ceil(-1 * $rotationAmount / $alphabetSize) * $alphabetSize;
        }

        return $rotationAmount;
    }
private function getValidRotationAmount ( $ rotationAmount ) { $ rotationAmount = ( int ) $ rotationAmount ; $ alphabetSize = $ this -> getAlphabetSize ( ) ; if ( $ rotationAmount < 0 ) { $ rotationAmount += ( int ) ceil ( - 1 * $ rotationAmount / $ alphabetSize ) * $ alphabetSize ; } return $ rotationAmount ; }
Get valid rotation amount.

@param int $rotationAmount

@return int
Get valid rotation amount .