Doctrine\MongoDB\Aggregation\Stage\Group::avg PHP Method

avg() public method

Returns the average value of the numeric values that result from applying a specified expression to each document in a group of documents that share the same group by key. Ignores nun-numeric values.
See also: http://docs.mongodb.org/manual/reference/operator/aggregation/avg/
See also: Expr::avg
public avg ( mixed | Expr $expression ) : Operator
$expression mixed | Doctrine\MongoDB\Aggregation\Expr
return Operator
    public function avg($expression)
    {
        $this->expr->avg($expression);
        return $this;
    }