Passed
Push — master ( c3d608...c2b5ae )
by Yo
02:06 queued 46s
created

TagDoc::getDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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 self
26
     */
27 1
    public function setDescription(string $description) : self
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() : ?string
46
    {
47 1
        return $this->description;
48
    }
49
}
50