Doctrine\MongoDB\Aggregation\Stage\Project::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
Since: 1.3
public avg ( mixed | Expr $expression1 ) : Operator
$expression1 mixed | Doctrine\MongoDB\Aggregation\Expr
return Operator
    public function avg($expression1)
    {
        $this->expr->avg(func_num_args() === 1 ? $expression1 : func_get_args());
        return $this;
    }