Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Commit

Permalink
Loosen up strict typings (#1)
Browse files Browse the repository at this point in the history
* default value for fixVersions

* cast to null

* make version nullable

* set globalId to empty string, because not every assigned link has a global id. just the links assigned from the api will have that field filled.
  • Loading branch information
hgriga authored Mar 21, 2024
1 parent 2bc1b15 commit 2b3cc99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Issue/IssueField.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class IssueField implements \JsonSerializable

public ?object $resolution;

public array $fixVersions;
public ?array $fixVersions = null;

public ?Reporter $creator;

Expand All @@ -60,8 +60,8 @@ class IssueField implements \JsonSerializable

public ?Reporter $assignee = null;

/** @var \JiraCloud\Issue\Version[] */
public $versions;
/** @var \JiraCloud\Issue\Version[]|null */
public ?array $versions = null;

/** @var \JiraCloud\Issue\Attachment[] */
public $attachment;
Expand Down
1 change: 1 addition & 0 deletions src/Issue/RemoteIssueLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function jsonSerialize()
public function __construct()
{
$this->object = new RemoteObject();
$this->globalId = '';
}

public function setUrl(string $url): static
Expand Down

0 comments on commit 2b3cc99

Please sign in to comment.