protected function get_sort_direction(?int $sortmethod) : string {
        switch ($sortmethod) {
            case self::SORTORDER_LASTPOST_ASC:
            case self::SORTORDER_CREATED_ASC:
            case self::SORTORDER_REPLIES_ASC:
                return "ASC";
            case self::SORTORDER_LASTPOST_DESC:
            case self::SORTORDER_CREATED_DESC:
            case self::SORTORDER_REPLIES_DESC:
                return "DESC";
            default:
                return "DESC";
        }
    }
protected function get_sort_direction(?int $sortmethod) : string {
        switch ($sortmethod) {
            case self::SORTORDER_LASTPOST_ASC:
            case self::SORTORDER_CREATED_ASC:
            case self::SORTORDER_REPLIES_ASC:
                return "ASC";
            case self::SORTORDER_LASTPOST_DESC:
            case self::SORTORDER_CREATED_DESC:
            case self::SORTORDER_REPLIES_DESC:
                return "DESC";
            default:
                return "DESC";
        }
    }
protected function get_sort_direction ( ? int $ sortmethod ) : string { switch ( $ sortmethod ) { case self :: SORTORDER_LASTPOST_ASC : case self :: SORTORDER_CREATED_ASC : case self :: SORTORDER_REPLIES_ASC : return "ASC" ; case self :: SORTORDER_LASTPOST_DESC : case self :: SORTORDER_CREATED_DESC : case self :: SORTORDER_REPLIES_DESC : return "DESC" ; default : return "DESC" ; } }
Get the sort direction.

@param int|null $sortmethod
@return string
Get the sort direction .