Completed
Push — master ( a34372...4a8cdc )
by KwangSeob
01:46
created

Comment::setVisibility()   A

Complexity

Conditions 4
Paths 6

Size

Total Lines 17
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 11
nc 6
nop 2
dl 0
loc 17
rs 9.9
c 0
b 0
f 0
1
<?php
2
3
namespace JiraRestApi\Issue;
4
5
class Comment implements \JsonSerializable
6
{
7
    use VisibilityTrait;
8
9
    /** @var string */
10
    public $self;
11
12
    /** @var string */
13
    public $id;
14
15
    /** @var \JiraRestApi\Issue\Reporter */
16
    public $author;
17
18
    /** @var string */
19
    public $body;
20
21
    /** @var \JiraRestApi\Issue\Reporter */
22
    public $updateAuthor;
23
24
    /** @var \DateTime */
25
    public $created;
26
27
    /** @var \DateTime */
28
    public $updated;
29
30
    /** @var \JiraRestApi\Issue\Visibility */
31
    public $visibility;
32
33
    public function setBody($body)
34
    {
35
        $this->body = $body;
36
37
        return $this;
38
    }
39
40
    public function jsonSerialize()
41
    {
42
        return array_filter(get_object_vars($this));
43
    }
44
}
45