ClusterOptions::getDsn()   A
last analyzed

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
3
namespace WebPT\ZendCouchbaseModule;
4
5
use Assert\Assertion;
6
use Zend\Stdlib\AbstractOptions;
7
8
class ClusterOptions extends AbstractOptions
9
{
10
    /** @var string */
11
    private $dsn = 'couchbase://localhost';
12
    
13
    /** @var string */
14
    private $username = '';
15
    
16
    /** @var string */
17
    private $password = '';
18
    
19
    /**
20
     * @return string
21
     */
22 1
    public function getDsn()
23
    {
24 1
        return $this->dsn;
25
    }
26
    
27
    /**
28
     * @param string $dsn
29
     * @return void
30
     * @throws \Assert\AssertionFailedException
31
     */
32 1
    public function setDsn($dsn)
33
    {
34 1
        Assertion::string($dsn);
35
        
36 1
        $this->dsn = $dsn;
37 1
    }
38
    
39
    /**
40
     * @return string
41
     */
42 1
    public function getUsername()
43
    {
44 1
        return $this->username;
45
    }
46
    
47
    /**
48
     * @param string $username
49
     * @return void
50
     * @throws \Assert\AssertionFailedException
51
     */
52 1
    public function setUsername($username)
53
    {
54 1
        Assertion::string($username);
55
        
56 1
        $this->username = $username;
57 1
    }
58
    
59
    /**
60
     * @return string
61
     */
62 1
    public function getPassword()
63
    {
64 1
        return $this->password;
65
    }
66
    
67
    /**
68
     * @param string $password
69
     * @return void
70
     * @throws \Assert\AssertionFailedException
71
     */
72 1
    public function setPassword($password)
73
    {
74 1
        Assertion::string($password);
75
        
76 1
        $this->password = $password;
77 1
    }
78
}
79