DocBlock::shortDescription()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Leaditin\Code;
4
5
/**
6
 * @package Leaditin\Code
7
 * @author Igor Vuckovic <[email protected]>
8
 * @license MIT
9
 */
10
class DocBlock
11
{
12
    /**
13
     * @var null|string
14
     */
15
    protected $shortDescription;
16
17
    /**
18
     * @var null|string
19
     */
20
    protected $longDescription;
21
22
    /**
23
     * @var Tag[]
24
     */
25
    protected $tags = [];
26
27
    /**
28
     * @param null|string $shortDescription
29
     * @param null|string $longDescription
30
     * @param Tag[] $tags
31
     */
32 1
    public function __construct(string $shortDescription = null, string $longDescription = null, array $tags = [])
33
    {
34 1
        $this->shortDescription = $shortDescription;
35 1
        $this->longDescription = $longDescription;
36 1
        $this->tags = $tags;
37 1
    }
38
39
    /**
40
     * @return null|string
41
     */
42 1
    public function shortDescription(): ?string
43
    {
44 1
        return $this->shortDescription;
45
    }
46
47
    /**
48
     * @return null|string
49
     */
50 1
    public function longDescription(): ?string
51
    {
52 1
        return $this->longDescription;
53
    }
54
55
    /**
56
     * @return Tag[]
57
     */
58 1
    public function tags(): array
59
    {
60 1
        return $this->tags;
61
    }
62
}
63