Skip to content

Commit e7ba5dd

Browse files
committed
more bits of work
1 parent 0f895ac commit e7ba5dd

32 files changed

Lines changed: 378 additions & 120 deletions

src/ACL/ACLBindingRulesQueryResponse.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class ACLBindingRulesQueryResponse extends AbstractValuedQueryResponse implement
2828
/** @var \DCarbone\PHPConsulAPI\ACL\ACLBindingRule[] */
2929
public array $ACLBindingRules = [];
3030

31+
/**
32+
* @return \DCarbone\PHPConsulAPI\ACL\ACLBindingRule[]
33+
*/
3134
public function getValue(): array
3235
{
3336
return $this->ACLBindingRules;

src/ACL/ACLEntriesResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ class ACLEntriesResponse extends AbstractValuedQueryResponse implements Unmarsha
2828
/** @var \DCarbone\PHPConsulAPI\ACL\ACLEntry[] */
2929
public array $ACLEntries = [];
3030

31+
/**
32+
* @return \DCarbone\PHPConsulAPI\ACL\ACLEntry[]
33+
*/
3134
public function getValue(): array
3235
{
3336
return $this->ACLEntries;
3437
}
3538

3639
public function unmarshalValue(mixed $decoded): void
3740
{
41+
$this->ACLEntries = [];
3842
foreach ($decoded as $entry) {
3943
$this->ACLEntries[] = ACLEntry::jsonUnserialize($entry);
4044
}

src/ACL/ACLPolicyListEntryQueryResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ class ACLPolicyListEntryQueryResponse extends AbstractValuedQueryResponse implem
2828
/** @var \DCarbone\PHPConsulAPI\ACL\ACLPolicyListEntry[] */
2929
public array $ACLPolicyListEntries = [];
3030

31+
/**
32+
* @return \DCarbone\PHPConsulAPI\ACL\ACLPolicyListEntry[]
33+
*/
3134
public function getValue(): array
3235
{
3336
return $this->ACLPolicyListEntries;
3437
}
3538

3639
public function unmarshalValue(mixed $decoded): void
3740
{
41+
$this->ACLPolicyListEntries = [];
3842
foreach ($decoded as $datum) {
3943
$this->ACLPolicyListEntries[] = ACLPolicyListEntry::jsonUnserialize($datum);
4044
}

src/ACL/ACLRolesQueryResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ class ACLRolesQueryResponse extends AbstractValuedQueryResponse implements Unmar
2828
/** @var \DCarbone\PHPConsulAPI\ACL\ACLRole[] */
2929
public array $ACLRoles = [];
3030

31+
/**
32+
* @return \DCarbone\PHPConsulAPI\ACL\ACLRole[]
33+
*/
3134
public function getValue(): array
3235
{
3336
return $this->ACLRoles;
3437
}
3538

3639
public function unmarshalValue(mixed $decoded): void
3740
{
41+
$this->ACLRoles = [];
3842
foreach ($decoded as $datum) {
3943
$this->ACLRoles[] = ACLRole::jsonUnserialize($datum);
4044
}

src/ACL/ACLTokenListEntryQueryResponse.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ class ACLTokenListEntryQueryResponse extends AbstractValuedQueryResponse impleme
2828
/** @var \DCarbone\PHPConsulAPI\ACL\ACLTokenListEntry[] */
2929
public array $ACLTokenListEntries = [];
3030

31+
/**
32+
* @return \DCarbone\PHPConsulAPI\ACL\ACLTokenListEntry[]
33+
*/
3134
public function getValue(): array
3235
{
3336
return $this->ACLTokenListEntries;
3437
}
3538

3639
public function unmarshalValue(mixed $decoded): void
3740
{
41+
$this->ACLTokenListEntries = [];
3842
foreach ($decoded as $datum) {
3943
$this->ACLTokenListEntries[] = ACLTokenListEntry::jsonUnserialize($datum);
4044
}

src/Agent/AgentChecksResponse.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@
2525

2626
class AgentChecksResponse extends AbstractValuedResponse implements UnmarshalledResponseInterface
2727
{
28-
public array $Checks;
28+
/** @var \DCarbone\PHPConsulAPI\Agent\AgentCheck[] */
29+
public array $Checks = [];
2930

31+
/**
32+
* @return \DCarbone\PHPConsulAPI\Agent\AgentCheck[]|null
33+
*/
3034
public function getValue(): ?array
3135
{
3236
return $this->Checks;

src/Agent/AgentHealthServicesResponse.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class AgentHealthServicesResponse extends AbstractResponse
3232
/** @var \DCarbone\PHPConsulAPI\Agent\AgentServiceChecksInfo[] */
3333
public array $AgentServiceChecksInfos;
3434

35+
/**
36+
* @param string $aggregatedStatus
37+
* @param \stdClass[] $checkInfos
38+
* @param \DCarbone\PHPConsulAPI\Error|null $err
39+
*/
3540
public function __construct(string $aggregatedStatus, array $checkInfos, null|Error $err)
3641
{
3742
$this->AggregatedStatus = $aggregatedStatus;

src/Agent/AgentMembersResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
class AgentMembersResponse extends AbstractValuedResponse implements UnmarshalledResponseInterface
2727
{
2828
/** @var \DCarbone\PHPConsulAPI\Agent\AgentMember[] */
29-
public array $Members;
29+
public array $Members = [];
3030

3131
/**
3232
* @return \DCarbone\PHPConsulAPI\Agent\AgentMember[]

0 commit comments

Comments
 (0)