final public function orderBy(string $memberExpression, string $direction)
    {
        $this->orderings[] = new MemberOrdering(
            $this->memberExpressionParser->parse($this->class, $memberExpression),
            $direction
        );

        return $this;
    }
final public function orderBy(string $memberExpression, string $direction)
    {
        $this->orderings[] = new MemberOrdering(
            $this->memberExpressionParser->parse($this->class, $memberExpression),
            $direction
        );

        return $this;
    }
final public function orderBy ( string $ memberExpression , string $ direction ) { $ this -> orderings [ ] = new MemberOrdering ( $ this -> memberExpressionParser -> parse ( $ this -> class , $ memberExpression ) , $ direction ) ; return $ this ; }
Adds an ordering to the criteria.

Example:
<code>
->orderBy('some.property', OrderingDirection::ASC)
</code>

@param string $memberExpression
@param string $direction

@return static
@throws InvalidArgumentException
Adds an ordering to the criteria .