AbstractAttribute   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 59
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 59
ccs 20
cts 20
cp 1
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 6 1
A getName() 0 4 1
A setType() 0 6 1
A getType() 0 4 1
A setSlug() 0 6 1
A getSlug() 0 4 1
A setValue() 0 6 1
A getValue() 0 4 1
1
<?php
2
3
namespace PhpAbac\Model;
4
5
abstract class AbstractAttribute
6
{
7
    /** @var string **/
8
    protected $name;
9
    /** @var string **/
10
    protected $type;
11
    /** @var string **/
12
    protected $slug;
13
    /** @var mixed **/
14
    protected $value;
15
16 16
    public function setName(string $name): AbstractAttribute
17
    {
18 16
        $this->name = $name;
19
20 16
        return $this;
21
    }
22
23 4
    public function getName(): string
24
    {
25 4
        return $this->name;
26
    }
27
28 12
    public function setType(string $type): AbstractAttribute
29
    {
30 12
        $this->type = $type;
31
32 12
        return $this;
33
    }
34
35 10
    public function getType(): string
36
    {
37 10
        return $this->type;
38
    }
39
40 14
    public function setSlug(string $slug): AbstractAttribute
41
    {
42 14
        $this->slug = $slug;
43
44 14
        return $this;
45
    }
46
47 7
    public function getSlug(): string
48
    {
49 7
        return $this->slug;
50
    }
51
52 12
    public function setValue($value): AbstractAttribute
53
    {
54 12
        $this->value = $value;
55
56 12
        return $this;
57
    }
58
59 11
    public function getValue()
60
    {
61 11
        return $this->value;
62
    }
63
}
64