Test Failed
Pull Request — master (#66)
by
unknown
04:02 queued 01:06
created

Bucket   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 7
eloc 19
c 1
b 0
f 0
dl 0
loc 57
rs 10
ccs 11
cts 11
cp 1

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A getId() 0 3 1
A getType() 0 3 1
A getOptions() 0 3 1
A isS3Compatible() 0 3 1
A __construct() 0 7 1
A getCorsRules() 0 3 1
1
<?php
2
3
namespace BackblazeB2;
4
5
class Bucket
6
{
7
    const TYPE_PUBLIC = 'allPublic';
8
    const TYPE_PRIVATE = 'allPrivate';
9
10
    protected $id;
11
    protected $name;
12
    protected $type;
13
    protected $options;
14
    protected $corsRules;
15
16
    /**
17
     * Bucket constructor.
18
     *
19
     * @param $id
20
     * @param $name
21 6
     * @param $type
22
     * @param $options
23 6
     * @param $corsRules
24 6
     */
25 6
    public function __construct($id, $name, $type, $options, $corsRules)
26 6
    {
27
        $this->id = $id;
28 2
        $this->name = $name;
29
        $this->type = $type;
30 2
        $this->options = $options;
31
        $this->corsRules = $corsRules;
32
    }
33 2
34
    public function getId()
35 2
    {
36
        return $this->id;
37
    }
38 4
39
    public function getName()
40 4
    {
41
        return $this->name;
42
    }
43
44
    public function getType()
45
    {
46
        return $this->type;
47
    }
48
49
    public function getOptions()
50
    {
51
        return $this->options;
52
    }
53
54
    public function getCorsRules()
55
    {
56
        return $this->corsRules;
57
    }
58
59
    public function isS3Compatible()
60
    {
61
        return in_array('s3', $this->getOptions());
62
    }
63
}
64