Completed
Branch release/1.0.0 (faa89b)
by Yo
01:45
created

TagDoc::setDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
namespace Yoanm\JsonRpcServerDoc\Domain\Model;
3
4
/**
5
 * Class TagDoc
6
 */
7
class TagDoc
8
{
9
    /** @var string */
10
    private $name;
11
    /** @var string|null */
12
    private $description = null;
13
14
    /**
15
     * @param string $name
16
     */
17 2
    public function __construct(string $name)
18
    {
19 2
        $this->name = $name;
20 2
    }
21
22
    /**
23
     * @param string $description
24
     *
25
     * @return TagDoc
26
     */
27 1
    public function setDescription(string $description) : TagDoc
28
    {
29 1
        $this->description = $description;
30
31 1
        return $this;
32
    }
33
34
    /**
35
     * @return string
36
     */
37 1
    public function getName() : string
38
    {
39 1
        return $this->name;
40
    }
41
42
    /**
43
     * @return null|string
44
     */
45 1
    public function getDescription()
46
    {
47 1
        return $this->description;
48
    }
49
}
50