ValueField::__construct()   A
last analyzed

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 8
    public function __construct(string $name, string $value, ?string $comment)
12
    {
13 8
        parent::__construct($name, $comment);
14
15 8
        $this->setValue($value);
16 8
    }
17
18 4
    public function getValue(): string
19
    {
20 4
        return $this->value;
21
    }
22
23 8
    public function setValue(string $value): void
24
    {
25 8
        $this->value = $value;
26 8
    }
27
}
28