TagDoc   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 41
ccs 9
cts 9
cp 1
rs 10
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 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