Completed
Push — master ( 6e9edd...3f79e5 )
by Kevin
02:25
created

AbstractValuedToken::setValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
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 47
    public function __construct($type, Configuration $configuration, Token $parent = null, $value = null)
16
    {
17 47
        parent::__construct($type, $configuration, $parent);
18
19 47
        $this->value = $value;
20 47
    }
21
22
    /**
23
     * Getter for 'value'.
24
     */
25 30
    public function getValue()
26
    {
27 30
        return $this->value;
28
    }
29
30
    /**
31
     * Chainable setter for 'value'.
32
     */
33 1
    public function setValue($value)
34
    {
35 1
        $this->value = $value;
36
37 1
        return $this;
38
    }
39
}
40