public function orderBy(string $key, string $direction = 'ASC'): SelectQueryBuilder
    {
        array_push($this->orderBy, [
            'key' => $key,
            'direction' => strtoupper($direction),
        ]);
        return $this;
    }
public function orderBy(string $key, string $direction = 'ASC'): SelectQueryBuilder
    {
        array_push($this->orderBy, [
            'key' => $key,
            'direction' => strtoupper($direction),
        ]);
        return $this;
    }
public function orderBy ( string $ key , string $ direction = 'ASC' ) : SelectQueryBuilder { array_push ( $ this -> orderBy , [ 'key' => $ key , 'direction' => strtoupper ( $ direction ) , ] ) ; return $ this ; }
Adds an order by clause to query.

@param string $key
@param string $direction
@return SelectQueryBuilder
Adds an order by clause to query .