src/MailMap/Query.php
public function order($orderFlag, $dir = 'desc')
    {
        if (!in_array($orderFlag, static::$orderCriteria)) {
            throw new InvalidArgumentException("Invalid order criteria '{$orderFlag}'");
        }

        $this->order = $orderFlag;
        $this->orderDir = strtolower($dir) === 'asc' ? 0 : 1;

        return $this;
    }
public function order($orderFlag, $dir = 'desc')
    {
        if (!in_array($orderFlag, static::$orderCriteria)) {
            throw new InvalidArgumentException("Invalid order criteria '{$orderFlag}'");
        }

        $this->order = $orderFlag;
        $this->orderDir = strtolower($dir) === 'asc' ? 0 : 1;

        return $this;
    }
public function order ( $ orderFlag , $ dir = 'desc' ) { if ( ! in_array ( $ orderFlag , static :: $ orderCriteria ) ) { throw new InvalidArgumentException ( "Invalid order criteria '{$orderFlag}'" ) ; } $ this -> order = $ orderFlag ; $ this -> orderDir = strtolower ( $ dir ) === 'asc' ? 0 : 1 ; return $ this ; }
Set sorting order.

imap_sort only allows one sort condition http://php.net/manual/en/function.imap-sort.php
Calling again will overwrite previous

@param  int $orderFlag
@param  string $dir
@return $this
Set sorting order .