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

IndexSettings   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 57
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getNamespace() 0 4 1
A setNamespace() 0 5 1
A getType() 0 4 1
A setType() 0 5 1
A getAlias() 0 4 1
A setAlias() 0 5 1
A getHosts() 0 4 1
A setHosts() 0 5 1
1
<?php
2
/*
3
 * This file is part of the ONGR package.
4
 *
5
 * (c) NFQ Technologies UAB <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace ONGR\ElasticsearchBundle\Mapping;
12
13
class IndexSettings
14
{
15
    private $namespace;
16
17
    private $alias;
18
19
    /**
20
     * @deprecated will be removed in the v7
21
     */
22
    private $type;
23
24
    private $hosts = [];
25
26
    public function getNamespace(): string
27
    {
28
        return $this->namespace;
29
    }
30
31
    public function setNamespace(string $namespace): IndexSettings
32
    {
33
        $this->namespace = $namespace;
34
        return $this;
35
    }
36
37
    public function getType(): string
38
    {
39
        return $this->type;
0 ignored issues
show
Deprecated Code introduced by
The property ONGR\ElasticsearchBundle...ng\IndexSettings::$type has been deprecated with message: will be removed in the v7

This property has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.

Loading history...
40
    }
41
42
    public function setType(string $type): IndexSettings
43
    {
44
        $this->type = $type;
0 ignored issues
show
Deprecated Code introduced by
The property ONGR\ElasticsearchBundle...ng\IndexSettings::$type has been deprecated with message: will be removed in the v7

This property has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.

Loading history...
45
        return $this;
46
    }
47
48
    public function getAlias(): string
49
    {
50
        return $this->alias;
51
    }
52
53
    public function setAlias(string $alias): IndexSettings
54
    {
55
        $this->alias = $alias;
56
        return $this;
57
    }
58
59
    public function getHosts(): array
60
    {
61
        return $this->hosts;
62
    }
63
64
    public function setHosts(array $hosts): IndexSettings
65
    {
66
        $this->hosts = $hosts;
67
        return $this;
68
    }
69
}
70