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

Priority   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 50
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 2
A jsonSerialize() 0 3 1
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