Test Failed
Push — master ( 66d82e...4ebaf8 )
by Zaahid
03:17
created

ReceivedPart::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the ZBateson\MailMimeParser project.
4
 *
5
 * @license http://opensource.org/licenses/bsd-license.php BSD
6
 */
7
namespace ZBateson\MailMimeParser\Header\Part;
8
9
use ZBateson\StreamDecorators\Util\CharsetConverter;
10
11
/**
12
 * Represents one parameter in a parsed 'Received' header, e.g. the FROM or VIA
13
 * part.
14
 *
15
 * Note that FROM and BY actually get parsed into a sub-class,
16
 * ReceivedDomainPart which keeps track of other sub-parts that can be parsed
17
 * from them.
18
 *
19
 * @author Zaahid Bateson
20
 */
21
class ReceivedPart extends ParameterPart
22
{
23
    /**
24
     * Constructor.
25
     * 
26
     * @param CharsetConverter $charsetConverter
27
     * @param string $name
28
     * @param string $value
29
     */
30
    public function __construct(CharsetConverter $charsetConverter, $name, $value) {
31
        parent::__construct($charsetConverter, '', '');
32
        // can't be mime-encoded
33
        $this->name = trim($name);
34
        $this->value = trim($value);
35
    }
36
}
37