Completed
Push — master ( 0b908e...886262 )
by Kevin
02:30
created

AbstractValuedToken::setValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Groundskeeper\Tokens;
4
5
use Groundskeeper\Configuration;
6
7
abstract class AbstractValuedToken extends AbstractToken
8
{
9
    /** @var string */
10
    private $value;
11
12
    /**
13
     * Constructor
14
     */
15 20
    public function __construct($type, Configuration $configuration, Token $parent = null, $value = null)
16
    {
17 20
        parent::__construct($type, $configuration, $parent);
18
19 20
        $this->value = $value;
20 20
    }
21
22
    /**
23
     * Getter for 'value'.
24
     */
25 16
    public function getValue()
26
    {
27 16
        return $this->value;
28
    }
29
30
    /**
31
     * Chainable setter for 'value'.
32
     */
33
    public function setValue($value)
34
    {
35
        $this->value = $value;
36
37
        return $this;
38
    }
39
}
40