Completed
Push — 6.0-dev ( 1ef812...ceea66 )
by Simonas
01:30
created

PostCreateClientEvent   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 33
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getNamespace() 0 4 1
A setNamespace() 0 5 1
A getClient() 0 4 1
A setClient() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the ONGR package.
5
 *
6
 * (c) NFQ Technologies UAB <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ONGR\ElasticsearchBundle\Event;
13
14
use Elasticsearch\ClientBuilder;
15
use Symfony\Component\EventDispatcher\Event;
16
17
class PostCreateClientEvent extends Event
18
{
19
    private $namespace;
20
    private $client;
21
22
    public function __construct(string $namespace, ClientBuilder $client)
23
    {
24
        $this->namespace = $namespace;
25
        $this->client = $client;
26
    }
27
28
    public function getNamespace(): string
29
    {
30
        return $this->namespace;
31
    }
32
33
    public function setNamespace(string $namespace)
34
    {
35
        $this->namespace = $namespace;
36
        return $this;
37
    }
38
39
    public function getClient(): ClientBuilder
40
    {
41
        return $this->client;
42
    }
43
44
    public function setClient(ClientBuilder $client): PostCreateClientEvent
45
    {
46
        $this->client = $client;
47
        return $this;
48
    }
49
}
50