TagDoc::__construct()   A
last analyzed

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 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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 8
    public function __construct(string $name)
18
    {
19 8
        $this->name = $name;
20
    }
21
22
    /**
23
     * @param string $description
24
     *
25
     * @return self
26
     */
27 6
    public function setDescription(string $description) : self
28
    {
29 6
        $this->description = $description;
30
31 6
        return $this;
32
    }
33
34
    /**
35
     * @return string
36
     */
37 7
    public function getName() : string
38
    {
39 7
        return $this->name;
40
    }
41
42
    /**
43
     * @return null|string
44
     */
45 7
    public function getDescription() : ?string
46
    {
47 7
        return $this->description;
48
    }
49
}
50