GenericHeader   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 38
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A getValue() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Genkgo\Mail\Header;
5
6
use Genkgo\Mail\HeaderInterface;
7
8
final class GenericHeader implements HeaderInterface
9
{
10
    /**
11
     * @var HeaderName
12
     */
13
    private $name;
14
15
    /**
16
     * @var HeaderValue
17
     */
18
    private $value;
19
20
    /**
21
     * @param string $name
22
     * @param string $value
23
     */
24 33
    public function __construct(string $name, string $value)
25
    {
26 33
        $this->name = new HeaderName($name);
27 33
        $this->value = new HeaderValue($value);
28 33
    }
29
30
    /**
31
     * @return HeaderName
32
     */
33 32
    public function getName(): HeaderName
34
    {
35 32
        return $this->name;
36
    }
37
38
    /**
39
     * @return HeaderValue
40
     */
41 24
    public function getValue(): HeaderValue
42
    {
43 24
        return $this->value;
44
    }
45
}
46