@@ -18,7 +18,8 @@ class IssueService extends \JiraRestApi\JiraClient
1818 public function getIssueFromJSON ($ json )
1919 {
2020 $ issue = $ this ->json_mapper ->map (
21- $ json , new Issue ()
21+ $ json ,
22+ new Issue ()
2223 );
2324
2425 return $ issue ;
@@ -50,7 +51,8 @@ public function get($issueIdOrKey, $paramArray = [], $issueObject = null)
5051 $ this ->log ->info ("Result= \n" .$ ret );
5152
5253 return $ issue = $ this ->json_mapper ->map (
53- json_decode ($ ret ), $ issueObject
54+ json_decode ($ ret ),
55+ $ issueObject
5456 );
5557 }
5658
@@ -162,16 +164,21 @@ public function addAttachments($issueIdOrKey, $filePathArray)
162164 $ ret = json_decode ($ ret );
163165 if (is_array ($ ret )) {
164166 $ tmpArr = $ this ->json_mapper ->mapArray (
165- $ ret , new \ArrayObject (), '\JiraRestApi\Issue\Attachment '
167+ $ ret ,
168+ new \ArrayObject (),
169+ '\JiraRestApi\Issue\Attachment '
166170 );
167171
168172 foreach ($ tmpArr as $ t ) {
169173 array_push ($ attachArr , $ t );
170174 }
171175 } elseif (is_object ($ ret )) {
172- array_push ($ attachArr , $ this ->json_mapper ->map (
173- $ ret , new Attachment ()
174- )
176+ array_push (
177+ $ attachArr ,
178+ $ this ->json_mapper ->map (
179+ $ ret ,
180+ new Attachment ()
181+ )
175182 );
176183 }
177184 }
@@ -235,7 +242,8 @@ public function addComment($issueIdOrKey, $comment)
235242
236243 $ this ->log ->debug ('add comment result= ' .var_export ($ ret , true ));
237244 $ comment = $ this ->json_mapper ->map (
238- json_decode ($ ret ), new Comment ()
245+ json_decode ($ ret ),
246+ new Comment ()
239247 );
240248
241249 return $ comment ;
@@ -267,7 +275,8 @@ public function updateComment($issueIdOrKey, $id, $comment)
267275
268276 $ this ->log ->debug ('update comment result= ' .var_export ($ ret , true ));
269277 $ comment = $ this ->json_mapper ->map (
270- json_decode ($ ret ), new Comment ()
278+ json_decode ($ ret ),
279+ new Comment ()
271280 );
272281
273282 return $ comment ;
@@ -292,8 +301,9 @@ public function getComment($issueIdOrKey, $id)
292301
293302 $ this ->log ->debug ('get comment result= ' .var_export ($ ret , true ));
294303 $ comment = $ this ->json_mapper ->map (
295- json_decode ($ ret ), new Comment ()
296- );
304+ json_decode ($ ret ),
305+ new Comment ()
306+ );
297307
298308 return $ comment ;
299309 }
@@ -316,8 +326,9 @@ public function getComments($issueIdOrKey)
316326
317327 $ this ->log ->debug ('get comments result= ' .var_export ($ ret , true ));
318328 $ comment = $ this ->json_mapper ->map (
319- json_decode ($ ret ), new Comment ()
320- );
329+ json_decode ($ ret ),
330+ new Comment ()
331+ );
321332
322333 return $ comment ;
323334 }
@@ -439,7 +450,9 @@ public function getTransition($issueIdOrKey, $paramArray = [])
439450 $ data = json_encode (json_decode ($ ret )->transitions );
440451
441452 $ transitions = $ this ->json_mapper ->mapArray (
442- json_decode ($ data ), new \ArrayObject (), '\JiraRestApi\Issue\Transition '
453+ json_decode ($ data ),
454+ new \ArrayObject (),
455+ '\JiraRestApi\Issue\Transition '
443456 );
444457
445458 return $ transitions ;
@@ -536,11 +549,13 @@ public function search($jql, $startAt = 0, $maxResults = 15, $fields = [], $expa
536549 $ result = null ;
537550 if ($ this ->isRestApiV3 ()) {
538551 $ result = $ this ->json_mapper ->map (
539- $ json , new IssueSearchResultV3 ()
552+ $ json ,
553+ new IssueSearchResultV3 ()
540554 );
541555 } else {
542556 $ result = $ this ->json_mapper ->map (
543- $ json , new IssueSearchResult ()
557+ $ json ,
558+ new IssueSearchResult ()
544559 );
545560 }
546561
@@ -563,7 +578,8 @@ public function getTimeTracking($issueIdOrKey)
563578 $ this ->log ->debug ("getTimeTracking res= $ ret \n" );
564579
565580 $ issue = $ this ->json_mapper ->map (
566- json_decode ($ ret ), new Issue ()
581+ json_decode ($ ret ),
582+ new Issue ()
567583 );
568584
569585 return $ issue ->fields ->timeTracking ;
@@ -614,7 +630,8 @@ public function getWorklog($issueIdOrKey)
614630 $ ret = $ this ->exec ($ this ->uri ."/ $ issueIdOrKey/worklog " );
615631 $ this ->log ->debug ("getWorklog res= $ ret \n" );
616632 $ worklog = $ this ->json_mapper ->map (
617- json_decode ($ ret ), new PaginatedWorklog ()
633+ json_decode ($ ret ),
634+ new PaginatedWorklog ()
618635 );
619636
620637 return $ worklog ;
@@ -636,7 +653,8 @@ public function getWorklogById($issueIdOrKey, $workLogId)
636653 $ ret = $ this ->exec ($ this ->uri ."/ $ issueIdOrKey/worklog/ $ workLogId " );
637654 $ this ->log ->debug ("getWorklogById res= $ ret \n" );
638655 $ worklog = $ this ->json_mapper ->map (
639- json_decode ($ ret ), new Worklog ()
656+ json_decode ($ ret ),
657+ new Worklog ()
640658 );
641659
642660 return $ worklog ;
@@ -664,7 +682,8 @@ public function addWorklog($issueIdOrKey, $worklog)
664682 $ ret = $ this ->exec ($ url , $ data , $ type );
665683
666684 $ ret_worklog = $ this ->json_mapper ->map (
667- json_decode ($ ret ), new Worklog ()
685+ json_decode ($ ret ),
686+ new Worklog ()
668687 );
669688
670689 return $ ret_worklog ;
@@ -693,7 +712,8 @@ public function editWorklog($issueIdOrKey, $worklog, $worklogId)
693712 $ ret = $ this ->exec ($ url , $ data , $ type );
694713
695714 $ ret_worklog = $ this ->json_mapper ->map (
696- json_decode ($ ret ), new Worklog ()
715+ json_decode ($ ret ),
716+ new Worklog ()
697717 );
698718
699719 return $ ret_worklog ;
@@ -718,7 +738,7 @@ public function deleteWorklog($issueIdOrKey, $worklogId)
718738
719739 $ ret = $ this ->exec ($ url , null , $ type );
720740
721- return (bool )$ ret ;
741+ return (bool ) $ ret ;
722742 }
723743
724744 /**
@@ -733,7 +753,9 @@ public function getAllPriorities()
733753 $ ret = $ this ->exec ('priority ' , null );
734754
735755 $ priorities = $ this ->json_mapper ->mapArray (
736- json_decode ($ ret , false ), new \ArrayObject (), '\JiraRestApi\Issue\Priority '
756+ json_decode ($ ret , false ),
757+ new \ArrayObject (),
758+ '\JiraRestApi\Issue\Priority '
737759 );
738760
739761 return $ priorities ;
@@ -757,7 +779,8 @@ public function getPriority($priorityId)
757779 $ this ->log ->info ('Result= ' .$ ret );
758780
759781 $ prio = $ this ->json_mapper ->map (
760- json_decode ($ ret ), new Priority ()
782+ json_decode ($ ret ),
783+ new Priority ()
761784 );
762785
763786 return $ prio ;
@@ -781,7 +804,8 @@ public function getCustomFields($priorityId)
781804 $ this ->log ->info ('Result= ' .$ ret );
782805
783806 $ prio = $ this ->json_mapper ->map (
784- json_decode ($ ret ), new Priority ()
807+ json_decode ($ ret ),
808+ new Priority ()
785809 );
786810
787811 return $ prio ;
@@ -805,7 +829,9 @@ public function getWatchers($issueIdOrKey)
805829 $ ret = $ this ->exec ($ url , null );
806830
807831 $ watchers = $ this ->json_mapper ->mapArray (
808- json_decode ($ ret , false )->watchers , new \ArrayObject (), '\JiraRestApi\Issue\Reporter '
832+ json_decode ($ ret , false )->watchers ,
833+ new \ArrayObject (),
834+ '\JiraRestApi\Issue\Reporter '
809835 );
810836
811837 return $ watchers ;
@@ -987,7 +1013,9 @@ public function getRemoteIssueLink($issueIdOrKey)
9871013 $ ret = $ this ->exec ($ full_uri , null );
9881014
9891015 $ rils = $ this ->json_mapper ->mapArray (
990- json_decode ($ ret , false ), new \ArrayObject (), RemoteIssueLink::class
1016+ json_decode ($ ret , false ),
1017+ new \ArrayObject (),
1018+ RemoteIssueLink::class
9911019 );
9921020
9931021 return $ rils ;
@@ -1013,7 +1041,8 @@ public function createOrUpdateRemoteIssueLink($issueIdOrKey, RemoteIssueLink $ri
10131041 $ ret = $ this ->exec ($ full_uri , $ data , 'POST ' );
10141042
10151043 $ res = $ this ->json_mapper ->map (
1016- json_decode ($ ret ), new RemoteIssueLink ()
1044+ json_decode ($ ret ),
1045+ new RemoteIssueLink ()
10171046 );
10181047
10191048 return $ res ;
@@ -1067,7 +1096,9 @@ public function getAllIssueSecuritySchemes()
10671096 $ schemes = json_decode (json_encode ($ data ['issueSecuritySchemes ' ]), false );
10681097
10691098 $ res = $ this ->json_mapper ->mapArray (
1070- $ schemes , new \ArrayObject (), '\JiraRestApi\Issue\SecurityScheme '
1099+ $ schemes ,
1100+ new \ArrayObject (),
1101+ '\JiraRestApi\Issue\SecurityScheme '
10711102 );
10721103
10731104 return $ res ;
@@ -1090,7 +1121,8 @@ public function getIssueSecuritySchemes($securityId)
10901121 $ ret = $ this ->exec ($ url );
10911122
10921123 $ res = $ this ->json_mapper ->map (
1093- json_decode ($ ret ), new SecurityScheme ()
1124+ json_decode ($ ret ),
1125+ new SecurityScheme ()
10941126 );
10951127
10961128 return $ res ;
0 commit comments