Suggestions::getUserVoteWeight PHP Method

getUserVoteWeight() private method

private getUserVoteWeight ( $class, $direction )
    private function getUserVoteWeight($class, $direction)
    {
        switch ($class) {
            case 0:
                $weight = 1;
                break;
            case 1:
                $weight = 2;
                break;
            case 2:
                $weight = 3;
                break;
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
                $weight = 4;
                break;
            case 8:
                $weight = 5;
                break;
        }
        if ($direction == "down") {
            $weight = $weight * -1;
        }
        return $weight;
    }