Completed
Pull Request — master (#76)
by Pavel
02:58
created

Options   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 111
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 46.67%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 18
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 111
ccs 21
cts 45
cp 0.4667
rs 10

18 Methods

Rating   Name   Duplication   Size   Complexity  
A getPrefix() 0 4 1
A setPrefix() 0 5 1
A getTags() 0 4 1
A setTags() 0 5 1
A getRetentionPolicy() 0 4 1
A setRetentionPolicy() 0 5 1
A getProtocol() 0 4 1
A setProtocol() 0 5 1
A getHost() 0 4 1
A setHost() 0 5 1
A getPort() 0 4 1
A setPort() 0 5 1
A getUsername() 0 4 1
A setUsername() 0 5 1
A getPassword() 0 4 1
A setPassword() 0 5 1
A getDatabase() 0 4 1
A setDatabase() 0 5 1
1
<?php
2
namespace InfluxDB\Adapter\Http;
3
4
class Options
5
{
6
    private $host = 'localhost';
7
    private $port = 8086;
8
    private $username = 'root';
9
    private $password = 'root';
10
    private $protocol = 'http';
11
    private $database;
12
    private $retentionPolicy = 'default';
13
    private $tags = [];
14
    private $prefix = '';
15
16 30
    public function getPrefix()
17
    {
18 30
        return $this->prefix;
19
    }
20
21
    public function setPrefix($prefix)
22
    {
23
        $this->prefix = $prefix;
24
        return $this;
25
    }
26
27 16
    public function getTags()
28
    {
29 16
        return $this->tags;
30
    }
31
32
    public function setTags($tags)
33
    {
34
        $this->tags = $tags;
35
        return $this;
36
    }
37
38 16
    public function getRetentionPolicy()
39
    {
40 16
        return $this->retentionPolicy;
41
    }
42
43
    public function setRetentionPolicy($retentionPolicy)
44
    {
45
        $this->retentionPolicy = $retentionPolicy;
46
        return $this;
47
    }
48
49 30
    public function getProtocol()
50
    {
51 30
        return $this->protocol;
52
    }
53
54
    public function setProtocol($protocol)
55
    {
56
        $this->protocol = $protocol;
57
        return $this;
58
    }
59
60 30
    public function getHost()
61
    {
62 30
       return $this->host;
63
    }
64
65
    public function setHost($host)
66
    {
67
        $this->host = $host;
68
        return $this;
69
    }
70
71 30
    public function getPort()
72
    {
73 30
        return $this->port;
74
    }
75
76
    public function setPort($port)
77
    {
78
        $this->port = $port;
79
        return $this;
80
    }
81
82 24
    public function getUsername()
83
    {
84 24
        return $this->username;
85
    }
86
87
    public function setUsername($username)
88
    {
89
        $this->username = $username;
90
        return $this;
91
    }
92
93 24
    public function getPassword()
94
    {
95 24
        return $this->password;
96
    }
97
98
    public function setPassword($password)
99
    {
100
        $this->password = $password;
101
        return $this;
102
    }
103
104 24
    public function getDatabase()
105
    {
106 24
        return $this->database;
107
    }
108
109 7
    public function setDatabase($database)
110
    {
111 7
        $this->database = $database;
112 7
        return $this;
113
    }
114
}
115