Completed
Push — master ( 00278d...91b50a )
by Patrick
02:05
created

ValueField::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Artack\Dsn\Field;
6
7
class ValueField extends AbstractField
8
{
9
    private $value;
10
11 4
    public function __construct(string $name, string $value, ?string $comment)
12
    {
13 4
        parent::__construct($name, $comment);
14
15 4
        $this->setValue($value);
16 4
    }
17
18 4
    public function getValue(): string
19
    {
20 4
        return $this->value;
21
    }
22
23 4
    public function setValue(string $value): void
24
    {
25 4
        $this->value = $value;
26 4
    }
27
}
28