Completed
Pull Request — master (#42)
by Frederik
03:39
created

NameItem::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Genkgo\Mail\Protocol\Imap\MessageData;
5
6
final class NameItem implements ItemInterface
7
{
8
    /**
9
     * @var string
10
     */
11
    private $name;
12
13
    /**
14
     * NameItem constructor.
15
     * @param string $name
16
     */
17
    public function __construct(string $name)
18
    {
19
        $this->name = $name;
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    public function getName(): string
26
    {
27
        return $this->name;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function __toString(): string
34
    {
35
        return $this->name;
36
    }
37
}