ClientDecorator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 20
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getComponentName() 0 4 1
1
<?php
2
/**
3
 * @author @fabfuel <[email protected]>
4
 * @created: 19.06.15 14:29
5
 */
6
7
namespace Fabfuel\Prophiler\Decorator\Elasticsearch;
8
9
use Elasticsearch\Client;
10
use Fabfuel\Prophiler\Decorator\AbstractDecorator;
11
use Fabfuel\Prophiler\ProfilerInterface;
12
13
/**
14
 * Elasticsearch client decorator
15
 *
16
 * Class ClientDecorator
17
 * @package Common\Prophiler\Decorator\Elasticsearch
18
 */
19
class ClientDecorator extends AbstractDecorator
20
{
21
    /**
22
     * @param Client $client
23
     * @param ProfilerInterface $profiler
24
     */
25 1
    public function __construct(Client $client, ProfilerInterface $profiler)
26
    {
27 1
        $this->setDecorated($client);
28 1
        $this->setProfiler($profiler);
29 1
    }
30
31
    /**
32
     * @return string
33
     */
34 1
    public function getComponentName()
35
    {
36 1
        return 'Elasticsearch';
37
    }
38
}
39