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

NameItem   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 32
c 0
b 0
f 0
ccs 0
cts 12
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 4 1
A __toString() 0 4 1
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
}