@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | $this->log->addDebug('add comment result='.var_export($ret, true)); |
225 | 225 | $comment = $this->json_mapper->map( |
226 | - json_decode($ret), new Comment() |
|
226 | + json_decode($ret), new Comment() |
|
227 | 227 | ); |
228 | 228 | |
229 | 229 | return $comment; |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | $data = json_encode(json_decode($ret)->transitions); |
368 | 368 | |
369 | 369 | $transitions = $this->json_mapper->mapArray( |
370 | - json_decode($data), new \ArrayObject(), '\JiraRestApi\Issue\Transition' |
|
370 | + json_decode($data), new \ArrayObject(), '\JiraRestApi\Issue\Transition' |
|
371 | 371 | ); |
372 | 372 | |
373 | 373 | return $transitions; |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | $this->log->addDebug("getTimeTracking res=$ret\n"); |
485 | 485 | |
486 | 486 | $issue = $this->json_mapper->map( |
487 | - json_decode($ret), new Issue() |
|
487 | + json_decode($ret), new Issue() |
|
488 | 488 | ); |
489 | 489 | |
490 | 490 | return $issue->fields->timeTracking; |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | $ret = $this->exec($url, $data, $type); |
586 | 586 | |
587 | 587 | $ret_worklog = $this->json_mapper->map( |
588 | - json_decode($ret), new Worklog() |
|
588 | + json_decode($ret), new Worklog() |
|
589 | 589 | ); |
590 | 590 | |
591 | 591 | return $ret_worklog; |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | $ret = $this->exec('priority', null); |
633 | 633 | |
634 | 634 | $priorities = $this->json_mapper->mapArray( |
635 | - json_decode($ret, false), new \ArrayObject(), '\JiraRestApi\Issue\Priority' |
|
635 | + json_decode($ret, false), new \ArrayObject(), '\JiraRestApi\Issue\Priority' |
|
636 | 636 | ); |
637 | 637 | |
638 | 638 | return $priorities; |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | $this->log->addInfo('Result='.$ret); |
657 | 657 | |
658 | 658 | $prio = $this->json_mapper->map( |
659 | - json_decode($ret), new Priority() |
|
659 | + json_decode($ret), new Priority() |
|
660 | 660 | ); |
661 | 661 | |
662 | 662 | return $prio; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $ret = $this->exec($this->uri, null); |
21 | 21 | |
22 | 22 | $fields = $this->json_mapper->mapArray( |
23 | - json_decode($ret, false), new \ArrayObject(), '\JiraRestApi\Field\Field' |
|
23 | + json_decode($ret, false), new \ArrayObject(), '\JiraRestApi\Field\Field' |
|
24 | 24 | ); |
25 | 25 | |
26 | 26 | // temp array |
@@ -7,18 +7,18 @@ discard block |
||
7 | 7 | */ |
8 | 8 | class PriorityService extends \JiraRestApi\JiraClient |
9 | 9 | { |
10 | - private $uri = '/priority'; |
|
11 | - |
|
12 | - /** |
|
13 | - * Function to get all priorities. |
|
14 | - * |
|
15 | - * @throws \JiraRestApi\JiraException |
|
16 | - * @throws \JsonMapper_Exception |
|
17 | - * |
|
18 | - * @return Priority|object Priority class |
|
19 | - */ |
|
20 | - public function getAll() |
|
21 | - { |
|
10 | + private $uri = '/priority'; |
|
11 | + |
|
12 | + /** |
|
13 | + * Function to get all priorities. |
|
14 | + * |
|
15 | + * @throws \JiraRestApi\JiraException |
|
16 | + * @throws \JsonMapper_Exception |
|
17 | + * |
|
18 | + * @return Priority|object Priority class |
|
19 | + */ |
|
20 | + public function getAll() |
|
21 | + { |
|
22 | 22 | $queryParam = '?'.http_build_query(); |
23 | 23 | |
24 | 24 | $ret = $this->exec($this->uri, null); |
@@ -29,12 +29,12 @@ discard block |
||
29 | 29 | $priorities = []; |
30 | 30 | |
31 | 31 | foreach ($priorityData as $priority) { |
32 | - $priorities[] = $this->json_mapper->map( |
|
32 | + $priorities[] = $this->json_mapper->map( |
|
33 | 33 | $priority, new Priority() |
34 | - ); |
|
34 | + ); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | return $priorities; |
38 | - } |
|
38 | + } |
|
39 | 39 | |
40 | 40 | } |
@@ -9,54 +9,54 @@ |
||
9 | 9 | */ |
10 | 10 | class Priority implements \JsonSerializable |
11 | 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 | - { |
|
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 | 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 | - { |
|
49 | + } |
|
50 | + |
|
51 | + /** |
|
52 | + * Priority constructor. |
|
53 | + * |
|
54 | + * @param array $array priority info array. |
|
55 | + */ |
|
56 | + public function __construct($array = []) |
|
57 | + { |
|
58 | 58 | foreach ($array as $key=>$value) { |
59 | - $this->{$key} = $value; |
|
59 | + $this->{$key} = $value; |
|
60 | + } |
|
60 | 61 | } |
61 | - } |
|
62 | 62 | } |