original_string: 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";
          }
      }
code: 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";
          }
      }
code_tokens: 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" ; } }
docstring: Get the sort direction.
  
  @param int|null $sortmethod
  @return string
docstring_tokens: Get the sort direction .