Completed
Push — master ( 4bfa8e...188c75 )
by KwangSeob
21s queued 11s
created

CommentV3   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 4
Bugs 0 Features 1
Metric Value
eloc 7
c 4
b 0
f 1
dl 0
loc 24
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addCommentParagraph() 0 9 2
A setBody() 0 3 1
1
<?php
2
3
namespace JiraRestApi\Issue;
4
5
class CommentV3 extends Comment
6
{
7
    /** @var \JiraRestApi\Issue\DescriptionV3|null */
8
    public $body;
9
10
    public function setBody($body)
11
    {
12
        return $this->addCommentParagraph($body);
13
    }
14
    
15
    /**
16
     * @param \JiraRestApi\Issue\DescriptionV3|null $description
17
     *
18
     * @return $this
19
     */
20
    public function addCommentParagraph($description)
21
    {
22
        if (empty($this->body)) {
23
            $this->body = new DescriptionV3();
24
        }
25
        
26
        $this->body->addDescriptionContent('paragraph', $description);
27
28
        return $this;
29
    }
30
}
31