AbstractHeader::toString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * This file is part of slick/mail package
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Slick\Mail\Header;
11
12
/**
13
 * Abstract Header
14
 *
15
 * @package Slick\Mail\Header
16
 * @author  Filipe Silva <[email protected]>
17
 */
18
abstract class AbstractHeader implements HeaderInterface
19
{
20
21
    /**
22
     * @var string
23
     */
24
    protected $name;
25
26
    /**
27
     * @var string
28
     */
29
    protected $value;
30
31
    /**
32
     *  HeaderInterface methods
33
     */
34
    use HeaderCommonMethods;
35
36
    /**
37
     * Returns the string version of this header
38
     *
39
     * @return string
40
     */
41 10
    public function toString()
42
    {
43 10
        return "{$this->getName()}: {$this->getValue()}";
44
    }
45
46
}