AbstractField   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 19
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 3 1
A getComment() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Artack\Dsn\Field;
6
7
class AbstractField implements FieldInterface
8
{
9
    private $name;
10
    private $comment;
11
12 88
    public function __construct(string $name, ?string $comment)
13
    {
14 88
        $this->name = $name;
15 88
        $this->comment = $comment;
16 88
    }
17
18 14
    public function getName(): string
19
    {
20 14
        return $this->name;
21
    }
22
23 4
    public function getComment(): ?string
24
    {
25 4
        return $this->comment;
26
    }
27
}
28