AbstractValuedToken   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 31
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getValue() 0 4 1
A setValue() 0 4 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 142
    public function __construct(Configuration $configuration, int $line, int $position, string $value = null)
16
    {
17 142
        parent::__construct($configuration, $line, $position);
18
19 142
        $this->value = $value;
20 142
    }
21
22
    /**
23
     * Getter for 'value'.
24
     */
25 138
    public function getValue()
26
    {
27 138
        return $this->value;
28
    }
29
30
    /**
31
     * Chainable setter for 'value'.
32
     */
33 1
    public function setValue(string $value = null)
34
    {
35 1
        $this->value = $value;
36 1
    }
37
}
38