Passed
Push — v7 ( ef6b54...43ee37 )
by Georges
01:54
created

Config::getHost()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Geolim4
5
 * Date: 12/02/2018
6
 * Time: 23:10
7
 */
8
9
namespace Phpfastcache\Drivers\Couchbase;
10
11
use Phpfastcache\Config\ConfigurationOption;
12
13
class Config extends ConfigurationOption
14
{
15
    /**
16
     * @var string
17
     */
18
    protected $host = '127.0.0.1';
19
20
    /**
21
     * @var int
22
     */
23
    protected $port;
24
25
    /**
26
     * @var string
27
     */
28
    protected $username;
29
30
    /**
31
     * @var string
32
     */
33
    protected $password;
34
35
    /**
36
     * @var string
37
     */
38
    protected $bucketName = 'default';
39
40
    /**
41
     * @return string
42
     */
43
    public function getHost(): string
44
    {
45
        return $this->host;
46
    }
47
48
    /**
49
     * @param string $host
50
     * @return Config
51
     */
52
    public function setHost(string $host): Config
53
    {
54
        $this->host = $host;
55
        return $this;
56
    }
57
58
    /**
59
     * @return int|null
60
     */
61
    public function getPort()
62
    {
63
        return $this->port;
64
    }
65
66
    /**
67
     * @param int $port
68
     * @return Config
69
     */
70
    public function setPort(int $port = null): Config
71
    {
72
        $this->port = $port;
73
        return $this;
74
    }
75
76
    /**
77
     * @return string
78
     */
79
    public function getUsername(): string
80
    {
81
        return $this->username;
82
    }
83
84
    /**
85
     * @param string $username
86
     * @return Config
87
     */
88
    public function setUsername(string $username): Config
89
    {
90
        $this->username = $username;
91
        return $this;
92
    }
93
94
    /**
95
     * @return string
96
     */
97
    public function getPassword(): string
98
    {
99
        return $this->password;
100
    }
101
102
    /**
103
     * @param string $password
104
     * @return Config
105
     */
106
    public function setPassword(string $password): Config
107
    {
108
        $this->password = $password;
109
        return $this;
110
    }
111
112
    /**
113
     * @return string
114
     */
115
    public function getBucketName(): string
116
    {
117
        return $this->bucketName;
118
    }
119
120
    /**
121
     * @param string $bucketName
122
     * @return Config
123
     */
124
    public function setBucketName(string $bucketName): Config
125
    {
126
        $this->bucketName = $bucketName;
127
        return $this;
128
    }
129
}