Skip to content

Commit

Permalink
fix php7.4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Naoray committed Dec 3, 2024
1 parent f80f4f1 commit 7c70d2c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Http/Payload/CreateMandatePayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function data(): array
'consumerAccount' => $this->consumerAccount,
'consumerBic' => $this->consumerBic,
'consumerEmail' => $this->consumerEmail,
'signatureDate' => $this->signatureDate?->format('Y-m-d'),
'signatureDate' => $this->signatureDate ? $this->signatureDate->format('Y-m-d') : null,
'mandateReference' => $this->mandateReference,
'paypalBillingAgreementId' => $this->paypalBillingAgreementId,
];
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Payload/CreatePaymentLinkPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function data(): array
'webhookUrl' => $this->webhookUrl,
'profileId' => $this->profileId,
'reusable' => $this->reusable,
'expiresAt' => $this->expiresAt?->format('Y-m-d'),
'expiresAt' => $this->expiresAt ? $this->expiresAt->format('Y-m-d') : null,
];
}
}
2 changes: 1 addition & 1 deletion src/Http/Payload/CreateSubscriptionPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function data(): array
'description' => $this->description,
'status' => $this->status,
'times' => $this->times,
'startDate' => $this->startDate?->format('Y-m-d'),
'startDate' => $this->startDate ? $this->startDate->format('Y-m-d') : null,
'method' => $this->method,
'applicationFee' => $this->applicationFee,
'metadata' => $this->metadata,
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Payload/UpdateSubscriptionPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function data(): array
'amount' => $this->amount,
'description' => $this->description,
'interval' => $this->interval,
'startDate' => $this->startDate?->format('Y-m-d'),
'startDate' => $this->startDate ? $this->startDate->format('Y-m-d') : null,
'times' => $this->times,
'metadata' => $this->metadata,
'webhookUrl' => $this->webhookUrl,
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Query/GetAllMethodsQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function toArray(): array
$this->includePricing ? MethodQuery::INCLUDE_PRICING : null,
]),
'locale' => $this->locale,
'amount' => $this->amount?->data(),
'amount' => $this->amount ? $this->amount->data() : null,
];
}
}
2 changes: 1 addition & 1 deletion src/Http/Query/GetEnabledPaymentMethodsQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function toArray(): array
return [
'sequenceType' => $this->sequenceType,
'locale' => $this->locale,
'amount' => $this->amount?->data(),
'amount' => $this->amount ? $this->amount->data() : null,
'resource' => $this->resource,
'billingCountry' => $this->billingCountry,
'includeWallets' => Arr::join($this->includeWallets ?? []),
Expand Down

0 comments on commit 7c70d2c

Please sign in to comment.