BucketOptions   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 2
cbo 2
dl 0
loc 48
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getBucket() 0 4 1
A setBucket() 0 6 1
A getPassword() 0 4 1
A setPassword() 0 6 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