Completed
Push — master ( ace84b...72cf7f )
by KwangSeob
9s
created

Priority::jsonSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace JiraRestApi\Priority;
4
5
use JiraRestApi\ClassSerialize;
6
7
/**
8
 * Description of Priority.
9
 */
10
class Priority implements \JsonSerializable
11
{
12
    use ClassSerialize;
13
14
    /**
15
     * uri which was hit.
16
     *
17
     * @var string
18
     */
19
    public $self;
20
21
    /**
22
     * @var string
23
     */
24
    public $statusColor;
25
26
    /**
27
     * @var string
28
     */
29
    public $description;
30
31
    /**
32
     * @var string
33
     */
34
    public $iconUrl;
35
36
    /**
37
     * @var string
38
     */
39
    public $name;
40
41
    /**
42
     * @var string
43
     */
44
    public $id;
45
46
    public function jsonSerialize()
47
    {
48
        return array_filter(get_object_vars($this));
49
    }
50
51
    /**
52
     * Priority constructor.
53
     *
54
     * @param array $array priority info array.
55
     */
56
    public function __construct($array = [])
57
    {
58
        foreach ($array as $key => $value) {
59
            $this->{$key} = $value;
60
        }
61
    }
62
}
63