Completed
Push — master ( 2d3e3c...0995af )
by Rob
09:50 queued 08:39
created

AbstractHandler::setValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace devtoolboxuk\cerberus\Handlers;
4
5
abstract class AbstractHandler
6
{
7
    private $active = false;
8
    private $wrappers = [];
9
    private $value;
10
    private $name;
11
    private $prefixes;
12
13
    private $score;
14
15 4
    public function __construct($value)
16
    {
17 4
        $this->setValue($value);
18 4
    }
19
20 4
    public function getValue()
21
    {
22 4
        return $this->value;
23
    }
24
25 4
    protected function setValue($value)
26
    {
27 4
        $this->value = $value;
28 4
        return $this;
29
    }
30
31 4
    public function getName()
32
    {
33 4
        return $this->name;
34
    }
35
36 4
    protected function setName($value)
37
    {
38 4
        $this->name = $value;
39 4
        return $this;
40
    }
41
42 4
    public function getWrappers()
43
    {
44 4
        return $this->wrappers;
45
    }
46
47
    public function isActive()
48
    {
49
        return $this->active;
50
    }
51
52
    public function getScore()
53
    {
54
        return $this->score;
55
    }
56
57
    public function setScore($score)
58
    {
59
        $this->score = $score;
60
        return $this;
61
    }
62
63 4
    public function pushWrapper($wrapper)
64
    {
65 4
        array_unshift($this->wrappers, $wrapper);
66 4
        return $this;
67
    }
68
69
    protected function getPrefixes()
70
    {
71
        return $this->prefixes;
72
    }
73
74
}