original_string: public function orderBy(string $sort, string $order = 'ASC'): self
      {
          $order = 'ASC' === strtoupper($order) ? 'ASC' : 'DESC';
          $this->orderBy = [$sort => $order];
          return $this;
      }
code: public function orderBy(string $sort, string $order = 'ASC'): self
      {
          $order = 'ASC' === strtoupper($order) ? 'ASC' : 'DESC';
          $this->orderBy = [$sort => $order];
          return $this;
      }
code_tokens: public function orderBy ( string $ sort , string $ order = 'ASC' ) : self { $ order = 'ASC' === strtoupper ( $ order ) ? 'ASC' : 'DESC' ; $ this -> orderBy = [ $ sort => $ order ] ; return $ this ; }
docstring: Specifies an ordering for the query results
  Replaces any previously specified orderings, if any
  
  @param  string $sort  Sort expression
  @param  string $order Sort direction (ASC or DESC)
  
  @return $this
docstring_tokens: Specifies an ordering for the query results Replaces any previously specified orderings if any