MinAggregation   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 5 1
1
<?php namespace Nord\Lumen\Elasticsearch\Search\Aggregation\Metrics;
2
3
/**
4
 * A single-value metrics aggregation that keeps track and returns the minimum value among numeric values extracted from
5
 * the aggregated documents. These values can be extracted either from specific numeric fields in the documents, or be
6
 * generated by a provided script.
7
 *
8
 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-min-aggregation.html
9
 */
10
class MinAggregation extends AbstractAggregation
11
{
12
    /**
13
     * @inheritdoc
14
     */
15
    public function toArray()
16
    {
17
        return [
18
            'min' => [
19
                'field' => $this->getField()
20
            ]
21
        ];
22
    }
23
}
24