GenericHeader::getValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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