GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Transition   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 69
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Importance

Changes 0
Metric Value
wmc 7
lcom 2
cbo 0
dl 0
loc 69
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setTransitionName() 0 8 2
A setTransitionId() 0 8 2
A setCommentBody() 0 11 2
A jsonSerialize() 0 4 1
1
<?php
2
3
namespace JiraRestApi\Issue;
4
5
class TransitionTo
6
{
7
    /**
8
     * @var string
9
     */
10
    public $self;
11
12
    /**
13
     * @var string|null
14
     */
15
    public $description;
16
17
    /**
18
     * @var string|null
19
     */
20
    public $iconUrl;
21
22
    /**
23
     * @var string|null
24
     */
25
    public $name;
26
27
    /**
28
     * @var string
29
     */
30
    public $id;
31
32
    /**
33
     * @var array
34
     */
35
    public $statusCategory;
36
}
37
38
/**
39
 * Issue Transition mapping class.
40
 */
41
class Transition implements \JsonSerializable
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
42
{
43
    /**
44
     * @var string
45
     */
46
    public $id;
47
48
    /**
49
     * @var string
50
     */
51
    public $name;
52
53
    /**
54
     * @var TransitionTo
55
     */
56
    public $to;
57
58
    /**
59
     * @var array
60
     */
61
    public $fields;
62
63
    /**
64
     * @var IssueField
65
     */
66
    public $issueFields;
67
68
    /**
69
     * @var array
70
     */
71
    public $transition;
72
73
    public $update;
74
75
    public function setTransitionName($name)
76
    {
77
        if (is_null($this->transition)) {
78
            $this->transition = [];
79
        }
80
81
        $this->transition['name'] = $name;
82
    }
83
84
    public function setTransitionId($id)
85
    {
86
        if (is_null($this->transition)) {
87
            $this->transition = [];
88
        }
89
90
        $this->transition['id'] = $id;
91
    }
92
93
    public function setCommentBody($commentBody)
94
    {
95
        if (is_null($this->update)) {
96
            $this->update = [];
97
            $this->update['comment'] = [];
98
        }
99
100
        $ar = [];
101
        $ar['add']['body'] = $commentBody;
102
        array_push($this->update['comment'], $ar);
103
    }
104
105
    public function jsonSerialize()
106
    {
107
        return array_filter(get_object_vars($this));
108
    }
109
}
110