lib/Elastica/Aggregation/Histogram.php
public function setOrder(string $order, string $direction): self
    {
        return $this->setParam('order', [$order => $direction]);
    }
public function setOrder(string $order, string $direction): self
    {
        return $this->setParam('order', [$order => $direction]);
    }
public function setOrder ( string $ order , string $ direction ) : self { return $ this -> setParam ( 'order' , [ $ order => $ direction ] ) ; }
Set the bucket sort order.

@param string $order     "_count", "_term", or the name of a sub-aggregation or sub-aggregation response field
@param string $direction "asc" or "desc"

@return $this
Set the bucket sort order .