Options::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
namespace InfluxDB\Adapter\Udp;
3
4
class Options
5
{
6
    private $host;
7
    private $port;
8
    private $tags;
9
10 17
    public function __construct()
11
    {
12 17
        $this->setHost("localhost");
13 17
        $this->setTags([]);
14 17
        $this->setPort(4444);
15 17
    }
16
17 5
    public function getPort()
18
    {
19 5
        return $this->port;
20
    }
21
22 17
    public function setPort($port)
23
    {
24 17
        $this->port = $port;
25 17
        return $this;
26
    }
27
28 17
    public function getTags()
29
    {
30 17
        return $this->tags;
31
    }
32
33 17
    public function setTags($tags)
34
    {
35 17
        $this->tags = $tags;
36 17
        return $this;
37
    }
38
39 5
    public function getHost()
40
    {
41 5
       return $this->host;
42
    }
43
44 17
    public function setHost($host)
45
    {
46 17
        $this->host = $host;
47 17
        return $this;
48
    }
49
}
50
51