Skip to content

Commit 2d5e7c5

Browse files
authored
Set default to null for all nullable properties (#545)
1 parent 06c20a4 commit 2d5e7c5

File tree

7 files changed

+33
-33
lines changed

7 files changed

+33
-33
lines changed

src/Component/Component.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Component implements \JsonSerializable
2525

2626
public string $description;
2727

28-
public ?User $lead;
28+
public ?User $lead = null;
2929

3030
public string $leadUserName;
3131

src/Issue/Issue.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Issue implements \JsonSerializable
77
/**
88
* return only if Project query by key(not id).
99
*/
10-
public ?string $expand;
10+
public ?string $expand = null;
1111

1212
public string $self;
1313

@@ -17,19 +17,19 @@ class Issue implements \JsonSerializable
1717

1818
public IssueField $fields;
1919

20-
public ?array $renderedFields;
20+
public ?array $renderedFields = null;
2121

22-
public ?array $names;
22+
public ?array $names = null;
2323

24-
public ?array $schema;
24+
public ?array $schema = null;
2525

26-
public ?array $transitions;
26+
public ?array $transitions = null;
2727

28-
public ?array $operations;
28+
public ?array $operations = null;
2929

30-
public ?array $editmeta;
30+
public ?array $editmeta = null;
3131

32-
public ?ChangeLog $changelog;
32+
public ?ChangeLog $changelog = null;
3333

3434
#[\ReturnTypeWillChange]
3535
public function jsonSerialize(): array

src/Issue/IssueField.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ class IssueField implements \JsonSerializable
1818

1919
public ?TimeTracking $timeTracking = null;
2020

21-
public ?IssueType $issuetype;
21+
public ?IssueType $issuetype = null;
2222

2323
public ?Reporter $reporter = null;
2424

25-
public ?DateTimeInterface $created;
25+
public ?DateTimeInterface $created = null;
2626

2727
public ?DateTimeInterface $updated = null;
2828

@@ -36,7 +36,7 @@ class IssueField implements \JsonSerializable
3636

3737
public Project $project;
3838

39-
public ?string $environment;
39+
public ?string $environment = null;
4040

4141
/* @var \JiraRestApi\Issue\Component[] This property must don't describe the type feature for JSON deserialized. */
4242
public $components;
@@ -45,15 +45,15 @@ class IssueField implements \JsonSerializable
4545

4646
public object $votes;
4747

48-
public ?object $resolution;
48+
public ?object $resolution = null;
4949

5050
public array $fixVersions;
5151

52-
public ?Reporter $creator;
52+
public ?Reporter $creator = null;
5353

54-
public ?object $watches;
54+
public ?object $watches = null;
5555

56-
public ?object $worklog;
56+
public ?object $worklog = null;
5757

5858
public ?Reporter $assignee = null;
5959

@@ -63,13 +63,13 @@ class IssueField implements \JsonSerializable
6363
/** @var \JiraRestApi\Issue\Attachment[] */
6464
public $attachment;
6565

66-
public ?string $aggregatetimespent;
66+
public ?string $aggregatetimespent = null;
6767

68-
public ?string $timeestimate;
68+
public ?string $timeestimate = null;
6969

70-
public ?string $aggregatetimeoriginalestimate;
70+
public ?string $aggregatetimeoriginalestimate = null;
7171

72-
public ?string $resolutiondate;
72+
public ?string $resolutiondate = null;
7373

7474
public ?DateTimeInterface $duedate = null;
7575

@@ -82,20 +82,20 @@ class IssueField implements \JsonSerializable
8282

8383
public int $workratio;
8484

85-
public ?object $aggregatetimeestimate;
85+
public ?object $aggregatetimeestimate = null;
8686

87-
public ?object $aggregateprogress;
87+
public ?object $aggregateprogress = null;
8888

89-
public ?object $lastViewed;
89+
public ?object $lastViewed = null;
9090

91-
public ?object $timeoriginalestimate;
91+
public ?object $timeoriginalestimate = null;
9292

9393
/** @var object|null */
9494
public $parent;
9595

96-
public ?array $customFields;
96+
public ?array $customFields = null;
9797

98-
public ?SecurityScheme $security;
98+
public ?SecurityScheme $security = null;
9999

100100
public function __construct($updateIssue = false)
101101
{

src/Issue/IssueType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class IssueType implements \JsonSerializable
88

99
public string $id;
1010

11-
public ?string $description;
11+
public ?string $description = null;
1212

1313
public string $iconUrl;
1414

src/Issue/Reporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Reporter implements \JsonSerializable
1414

1515
public string $self;
1616

17-
public ?string $name;
17+
public ?string $name = null;
1818

1919
public ?string $emailAddress = null;
2020

src/Project/Project.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Project implements \JsonSerializable
2828
/**
2929
* Project key.
3030
*/
31-
public ?string $key;
31+
public ?string $key = null;
3232

3333
/**
3434
* Project name.
@@ -73,17 +73,17 @@ class Project implements \JsonSerializable
7373
*/
7474
public $issueTypes;
7575

76-
public ?string $assigneeType;
76+
public ?string $assigneeType = null;
7777

7878
public ?array $versions = [];
7979

80-
public ?array $roles;
80+
public ?array $roles = null;
8181

8282
public string $url;
8383

8484
public string $projectTypeKey;
8585

86-
public ?string $projectTemplateKey;
86+
public ?string $projectTemplateKey = null;
8787

8888
public int $avatarId;
8989

src/ServiceDesk/Customer/Customer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Customer implements JsonSerializable
2020
public string $displayName;
2121
public bool $active;
2222
public string $timeZone;
23-
public ?CustomerLinks $_links;
23+
public ?CustomerLinks $_links = null;
2424
public string $self;
2525

2626
public function setLinks($links): void

0 commit comments

Comments
 (0)