Skip to content

Commit

Permalink
Merge branch 'main' of github.com:lesstif/php-jira-rest-client
Browse files Browse the repository at this point in the history
* 'main' of github.com:lesstif/php-jira-rest-client:
  Fix comment method not returning multiple comments (#432)
  Apply fixes from StyleCI (#443)
  • Loading branch information
lesstif committed Jun 16, 2022
2 parents 30cc215 + fce4fdd commit 8f9bbec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/Issue/IssueFieldV3.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/Issue/IssueService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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;
}

/**
Expand Down

0 comments on commit 8f9bbec

Please sign in to comment.