Failed Conditions
Pull Request — release/1.0.0 (#8)
by Yo
01:36
created

TagDoc   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 41
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setDescription() 0 5 1
A getName() 0 3 1
A getDescription() 0 3 1
A __construct() 0 3 1
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