diff --git a/src/Issue/IssueFieldV3.php b/src/Issue/IssueFieldV3.php index e0abceb..100a23b 100644 --- a/src/Issue/IssueFieldV3.php +++ b/src/Issue/IssueFieldV3.php @@ -19,7 +19,7 @@ class IssueFieldV3 extends IssueField * * @return $this|IssueField */ - public function setDescriptionV3(?DescriptionV3 $description) : static + public function setDescriptionV3(?DescriptionV3 $description): static { $this->descriptionV3 = $description; @@ -31,7 +31,7 @@ public function setDescriptionV3(?DescriptionV3 $description) : static * * @return $this */ - public function addDescriptionParagraph(?DescriptionV3 $description) : static + public function addDescriptionParagraph(?DescriptionV3 $description): static { if (empty($this->description)) { $this->descriptionV3 = new DescriptionV3(); @@ -48,7 +48,7 @@ public function addDescriptionParagraph(?DescriptionV3 $description) : static * * @return $this */ - public function addDescriptionHeading($level, string $description) : static + public function addDescriptionHeading($level, string $description): static { if (empty($this->descriptionV3)) { $this->descriptionV3 = new DescriptionV3(); @@ -64,7 +64,7 @@ public function addDescriptionHeading($level, string $description) : static * * @return $this */ - public function setEnvironment(?DescriptionV3 $environment) : static + public function setEnvironment(?DescriptionV3 $environment): static { if (!empty($this->environmentV3)) { $this->environmentV3 = $environment; diff --git a/src/Issue/IssueService.php b/src/Issue/IssueService.php index e702f8c..bfb292f 100644 --- a/src/Issue/IssueService.php +++ b/src/Issue/IssueService.php @@ -317,7 +317,7 @@ public function getComment($issueIdOrKey, $id, array $paramArray = []) : Comment * @throws JiraException * @throws \JsonMapper_Exception * - * @return Comment Comment class + * @return Comments Comments class */ public function getComments($issueIdOrKey, array $paramArray = []) : Comments { @@ -326,12 +326,12 @@ public function getComments($issueIdOrKey, array $paramArray = []) : Comments $ret = $this->exec($this->uri.'/'.$issueIdOrKey.'/comment'.$this->toHttpQueryParameter($paramArray), null); $this->log->debug('get comments result='.var_export($ret, true)); - $comment = $this->json_mapper->map( + $comments = $this->json_mapper->map( json_decode($ret), - new Comment() + new Comments() ); - return $comment; + return $comments; } /**