Aggs   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 27
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addAggregation() 0 3 1
A getAggregations() 0 3 1
1
<?php
2
namespace Triadev\Es\Dsl\Dsl\Aggregation;
3
4
use ONGR\ElasticsearchDSL\Aggregation\AbstractAggregation;
5
6
abstract class Aggs
7
{
8
    /**
9
     * Aggregations
10
     *
11
     * @var array
12
     */
13
    private $aggregations = [];
14
    
15
    /**
16
     * Add aggregation
17
     *
18
     * @param AbstractAggregation $agg
19
     */
20 41
    protected function addAggregation(AbstractAggregation $agg)
21
    {
22 41
        $this->aggregations[] = $agg;
23 41
    }
24
    
25
    /**
26
     * Get aggregations
27
     *
28
     * @return array
29
     */
30 41
    public function getAggregations() : array
31
    {
32 41
        return $this->aggregations;
33
    }
34
}
35