protected function doRotation(
        /*# string */ $path,
        /*# int */ $type
    )/*# : bool */ {
        switch ($type) {
            // no rotation
            case self::ROTATE_NONE:
                return true;

            // rotate by date
            case self::ROTATE_DATE:
                return $this->rotateByDate($path);

            // rotate by size
            default:
                return $this->rotateBySize($path, $type);
        }
    }