Total Complexity | 7 |
Total Lines | 67 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class IssueFieldV3 extends IssueField |
||
8 | { |
||
9 | use ClassSerialize; |
||
10 | |||
11 | /** @var \JiraRestApi\Issue\DescriptionV3|null */ |
||
12 | public $description; |
||
13 | |||
14 | /** @var \JiraRestApi\Issue\DescriptionV3|null */ |
||
15 | public $environment; |
||
16 | |||
17 | /** |
||
18 | * @param \JiraRestApi\Issue\DescriptionV3|null $description |
||
19 | * |
||
20 | * @return $this|IssueField |
||
21 | */ |
||
22 | public function setDescription($description) |
||
23 | { |
||
24 | $this->description = $description; |
||
25 | |||
26 | return $this; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param \JiraRestApi\Issue\DescriptionV3|null $description |
||
31 | * |
||
32 | * @return $this |
||
33 | */ |
||
34 | public function addDescriptionParagraph($description) |
||
35 | { |
||
36 | if (empty($this->description)) { |
||
37 | $this->description = new DescriptionV3(); |
||
38 | } |
||
39 | |||
40 | $this->description->addDescriptionContent('paragraph', $description); |
||
41 | |||
42 | return $this; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @param int $level heading level |
||
47 | * @param string $description |
||
48 | * |
||
49 | * @return $this |
||
50 | */ |
||
51 | public function addDescriptionHeading($level, $description) |
||
52 | { |
||
53 | if (empty($this->description)) { |
||
54 | $this->description = new DescriptionV3(); |
||
55 | } |
||
56 | |||
57 | $this->description->addDescriptionContent('heading', $description, ['level' => $level]); |
||
58 | |||
59 | return $this; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @param \JiraRestApi\Issue\DescriptionV3|null $environment |
||
64 | * |
||
65 | * @return $this |
||
66 | */ |
||
67 | public function setEnvironment($environment) |
||
74 | } |
||
75 | } |
||
76 |