Completed
Pull Request — develop (#45)
by Hugo
07:07 queued 25s
created

AggregationBuilder   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
dl 0
loc 35
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A createGlobalAggregation() 0 3 1
A createTermsAggregation() 0 3 1
A createMaxAggregation() 0 3 1
A createMinAggregation() 0 3 1
1
<?php namespace Nord\Lumen\Elasticsearch\Search\Aggregation;
2
3
use Nord\Lumen\Elasticsearch\Search\Aggregation\Bucket\GlobalAggregation;
4
use Nord\Lumen\Elasticsearch\Search\Aggregation\Bucket\TermsAggregation;
5
use Nord\Lumen\Elasticsearch\Search\Aggregation\Metrics\MaxAggregation;
6
use Nord\Lumen\Elasticsearch\Search\Aggregation\Metrics\MinAggregation;
7
8
class AggregationBuilder
9
{
10
    /**
11
     * @return GlobalAggregation
12
     */
13
    public function createGlobalAggregation()
14
    {
15
        return new GlobalAggregation();
16
    }
17
18
19
    /**
20
     * @return TermsAggregation
21
     */
22
    public function createTermsAggregation()
23
    {
24
        return new TermsAggregation();
25
    }
26
27
28
    /**
29
     * @return MaxAggregation
30
     */
31
    public function createMaxAggregation()
32
    {
33
        return new MaxAggregation();
34
    }
35
36
37
    /**
38
     * @return MinAggregation
39
     */
40
    public function createMinAggregation()
41
    {
42
        return new MinAggregation();
43
    }
44
}
45