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

Options::getUsername()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 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