Tag::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
namespace Leaditin\Code;
4
5
/**
6
 * @package Leaditin\Code
7
 * @author Igor Vuckovic <[email protected]>
8
 * @license MIT
9
 */
10
class Tag
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $name;
16
17
    /**
18
     * @var string
19
     */
20
    protected $value;
21
22
    /**
23
     * @var null|string
24
     */
25
    protected $description;
26
27
    /**
28
     * @param string $name
29
     * @param string $value
30
     * @param null|string $description
31
     */
32 2
    public function __construct(string $name, string $value, string $description = null)
33
    {
34 2
        $this->name = $name;
35 2
        $this->value = $value;
36 2
        $this->description = $description;
37 2
    }
38
39
    /**
40
     * @return string
41
     */
42 2
    public function name(): string
43
    {
44 2
        return $this->name;
45
    }
46
47
    /**
48
     * @return string
49
     */
50 2
    public function value(): string
51
    {
52 2
        return $this->value;
53
    }
54
55
    /**
56
     * @return null|string
57
     */
58 2
    public function description(): ?string
59
    {
60 2
        return $this->description;
61
    }
62
}
63