BucketOptions::setPassword()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace WebPT\ZendCouchbaseModule;
4
5
use Assert\Assertion;
6
use Zend\Stdlib\AbstractOptions;
7
8
class BucketOptions extends AbstractOptions
9
{
10
    /** @var string */
11
    private $bucket = 'default';
12
    
13
    /** @var string */
14
    private $password = '';
15
    
16
    /**
17
     * @return string
18
     */
19 1
    public function getBucket()
20
    {
21 1
        return $this->bucket;
22
    }
23
    
24
    /**
25
     * @param string $bucket
26
     * @return void
27
     * @throws \Assert\AssertionFailedException
28
     */
29 1
    public function setBucket($bucket)
30
    {
31 1
        Assertion::string($bucket);
32
        
33 1
        $this->bucket = $bucket;
34 1
    }
35
    
36
    /**
37
     * @return string
38
     */
39 1
    public function getPassword()
40
    {
41 1
        return $this->password;
42
    }
43
    
44
    /**
45
     * @param string $password
46
     * @return void
47
     * @throws \Assert\AssertionFailedException
48
     */
49 1
    public function setPassword($password)
50
    {
51 1
        Assertion::string($password);
52
        
53 1
        $this->password = $password;
54 1
    }
55
}
56