Completed
Pull Request — master (#22)
by Sergey
24:02 queued 09:01
created

ElasticsearchCollection::getAggregation()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 2.0438

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 7
cts 9
cp 0.7778
rs 9.6666
c 0
b 0
f 0
cc 2
eloc 6
nc 2
nop 1
crap 2.0438
1
<?php
2
3
namespace Isswp101\Persimmon\Collection;
4
5
use Isswp101\Persimmon\Response\ElasticsearchCollectionResponse;
6
7
class ElasticsearchCollection extends Collection implements IElasticsearchCollection
8
{
9
    private $response;
10
11
    public function __construct(array $items = [], ElasticsearchCollectionResponse $response)
12
    {
13
        parent::__construct($items);
14
        $this->response = $response;
15
    }
16
17
    public function getElasticsearchResponse(): ElasticsearchCollectionResponse
18
    {
19
        return $this->response;
20
    }
21
}