From f80f4f1c6b7caf86e2d4d366c659b30ce7036824 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Tue, 3 Dec 2024 12:45:48 +0100 Subject: [PATCH] fix php7.4 compatibility --- src/Http/Payload/CreateMandatePayload.php | 2 +- src/Http/Payload/CreateRefundPaymentPayload.php | 2 +- src/Http/Payload/CreateSubscriptionPayload.php | 2 +- src/Http/Payload/UpdatePaymentLinkPayload.php | 2 +- src/Http/Payload/UpdatePaymentRoutePayload.php | 2 +- src/Http/Query/CreatePaymentQuery.php | 2 +- src/Http/Query/GetAllMethodsQuery.php | 2 +- src/Http/Query/GetBalanceReportQuery.php | 2 +- src/Http/Query/GetClientQuery.php | 2 +- src/Http/Query/GetEnabledPaymentMethodsQuery.php | 2 +- src/Http/Query/GetPaginatedClientQuery.php | 2 +- src/Http/Query/GetPaginatedSettlementsQuery.php | 2 +- src/Http/Query/GetPaymentMethodQuery.php | 2 +- src/Http/Query/GetPaymentQuery.php | 2 +- src/Http/Query/GetPaymentRefundQuery.php | 2 +- src/Http/Query/PaginatedQuery.php | 2 +- src/Http/Query/SortablePaginatedQuery.php | 2 +- src/Http/Requests/CreateCustomerPaymentRequest.php | 2 +- tests/EndpointCollection/BalanceEndpointCollectionTest.php | 2 +- tests/Fixtures/MockResponse.php | 2 +- tests/Traits/ResolvesValuesTest.php | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/Http/Payload/CreateMandatePayload.php b/src/Http/Payload/CreateMandatePayload.php index a2623010..fda0ccbf 100644 --- a/src/Http/Payload/CreateMandatePayload.php +++ b/src/Http/Payload/CreateMandatePayload.php @@ -30,7 +30,7 @@ public function __construct( ?string $consumerEmail = null, ?DateTimeInterface $signatureDate = null, ?string $mandateReference = null, - ?string $paypalBillingAgreementId = null, + ?string $paypalBillingAgreementId = null ) { $this->method = $method; $this->consumerName = $consumerName; diff --git a/src/Http/Payload/CreateRefundPaymentPayload.php b/src/Http/Payload/CreateRefundPaymentPayload.php index cb813bfa..add71a44 100644 --- a/src/Http/Payload/CreateRefundPaymentPayload.php +++ b/src/Http/Payload/CreateRefundPaymentPayload.php @@ -26,7 +26,7 @@ public function __construct( Money $amount, ?Metadata $metadata = null, ?bool $reverseRouting = null, - ?DataCollection $routingReversals = null, + ?DataCollection $routingReversals = null ) { $this->description = $description; $this->amount = $amount; diff --git a/src/Http/Payload/CreateSubscriptionPayload.php b/src/Http/Payload/CreateSubscriptionPayload.php index ad7faba6..648ba89a 100644 --- a/src/Http/Payload/CreateSubscriptionPayload.php +++ b/src/Http/Payload/CreateSubscriptionPayload.php @@ -42,7 +42,7 @@ public function __construct( ?Metadata $metadata = null, ?string $webhookUrl = null, ?string $mandateId = null, - ?string $profileId = null, + ?string $profileId = null ) { $this->amount = $amount; $this->interval = $interval; diff --git a/src/Http/Payload/UpdatePaymentLinkPayload.php b/src/Http/Payload/UpdatePaymentLinkPayload.php index 92c56b66..83444ff7 100644 --- a/src/Http/Payload/UpdatePaymentLinkPayload.php +++ b/src/Http/Payload/UpdatePaymentLinkPayload.php @@ -10,7 +10,7 @@ class UpdatePaymentLinkPayload extends DataBag public function __construct( string $description, - bool $archived = false, + bool $archived = false ) { $this->description = $description; $this->archived = $archived; diff --git a/src/Http/Payload/UpdatePaymentRoutePayload.php b/src/Http/Payload/UpdatePaymentRoutePayload.php index 967e14ad..490bc810 100644 --- a/src/Http/Payload/UpdatePaymentRoutePayload.php +++ b/src/Http/Payload/UpdatePaymentRoutePayload.php @@ -9,7 +9,7 @@ class UpdatePaymentRoutePayload extends DataBag private DateTimeInterface $releaseDate; public function __construct( - DateTimeInterface $releaseDate, + DateTimeInterface $releaseDate ) { $this->releaseDate = $releaseDate; } diff --git a/src/Http/Query/CreatePaymentQuery.php b/src/Http/Query/CreatePaymentQuery.php index ebe90b01..ecb20717 100644 --- a/src/Http/Query/CreatePaymentQuery.php +++ b/src/Http/Query/CreatePaymentQuery.php @@ -12,7 +12,7 @@ class CreatePaymentQuery extends Query private bool $includeQrCode; public function __construct( - bool $includeQrCode = false, + bool $includeQrCode = false ) { $this->includeQrCode = $includeQrCode; } diff --git a/src/Http/Query/GetAllMethodsQuery.php b/src/Http/Query/GetAllMethodsQuery.php index 55b82d93..85040dd5 100644 --- a/src/Http/Query/GetAllMethodsQuery.php +++ b/src/Http/Query/GetAllMethodsQuery.php @@ -19,7 +19,7 @@ public function __construct( bool $includeIssuers = false, bool $includePricing = false, ?string $locale = null, - ?Money $amount = null, + ?Money $amount = null ) { $this->locale = $locale; $this->includeIssuers = $includeIssuers; diff --git a/src/Http/Query/GetBalanceReportQuery.php b/src/Http/Query/GetBalanceReportQuery.php index f469e998..c3d0070d 100644 --- a/src/Http/Query/GetBalanceReportQuery.php +++ b/src/Http/Query/GetBalanceReportQuery.php @@ -15,7 +15,7 @@ class GetBalanceReportQuery extends Query public function __construct( DateTimeInterface $from, DateTimeInterface $until, - ?string $grouping = null, + ?string $grouping = null ) { $this->from = $from; $this->until = $until; diff --git a/src/Http/Query/GetClientQuery.php b/src/Http/Query/GetClientQuery.php index d8776ce0..20d9b315 100644 --- a/src/Http/Query/GetClientQuery.php +++ b/src/Http/Query/GetClientQuery.php @@ -13,7 +13,7 @@ class GetClientQuery extends Query public function __construct( bool $embedOrganization = false, - bool $embedOnboarding = false, + bool $embedOnboarding = false ) { $this->embedOrganization = $embedOrganization; $this->embedOnboarding = $embedOnboarding; diff --git a/src/Http/Query/GetEnabledPaymentMethodsQuery.php b/src/Http/Query/GetEnabledPaymentMethodsQuery.php index e877e37b..90cc6f6d 100644 --- a/src/Http/Query/GetEnabledPaymentMethodsQuery.php +++ b/src/Http/Query/GetEnabledPaymentMethodsQuery.php @@ -18,7 +18,7 @@ public function __construct( private ?array $orderLineCategories = null, private ?string $profileId = null, private ?bool $includeIssuers = null, - private ?bool $includePricing = null, + private ?bool $includePricing = null ) {} public function toArray(): array diff --git a/src/Http/Query/GetPaginatedClientQuery.php b/src/Http/Query/GetPaginatedClientQuery.php index 094fb447..ccb8081a 100644 --- a/src/Http/Query/GetPaginatedClientQuery.php +++ b/src/Http/Query/GetPaginatedClientQuery.php @@ -16,7 +16,7 @@ class GetPaginatedClientQuery extends Query public function __construct( PaginatedQuery $paginatedQuery, bool $embedOrganization = false, - bool $embedOnboarding = false, + bool $embedOnboarding = false ) { $this->paginatedQuery = $paginatedQuery; $this->embedOrganization = $embedOrganization; diff --git a/src/Http/Query/GetPaginatedSettlementsQuery.php b/src/Http/Query/GetPaginatedSettlementsQuery.php index 53532372..8b6eb982 100644 --- a/src/Http/Query/GetPaginatedSettlementsQuery.php +++ b/src/Http/Query/GetPaginatedSettlementsQuery.php @@ -10,7 +10,7 @@ class GetPaginatedSettlementsQuery extends Query public function __construct( PaginatedQuery $query, - ?string $balanceId = null, + ?string $balanceId = null ) { $this->query = $query; $this->balanceId = $balanceId; diff --git a/src/Http/Query/GetPaymentMethodQuery.php b/src/Http/Query/GetPaymentMethodQuery.php index 90791dc6..92bb45a8 100644 --- a/src/Http/Query/GetPaymentMethodQuery.php +++ b/src/Http/Query/GetPaymentMethodQuery.php @@ -22,7 +22,7 @@ public function __construct( ?string $currency = null, ?string $profileId = null, bool $includeIssuers = false, - bool $includePricing = false, + bool $includePricing = false ) { $this->locale = $locale; $this->currency = $currency; diff --git a/src/Http/Query/GetPaymentQuery.php b/src/Http/Query/GetPaymentQuery.php index f5778188..1b24a355 100644 --- a/src/Http/Query/GetPaymentQuery.php +++ b/src/Http/Query/GetPaymentQuery.php @@ -22,7 +22,7 @@ public function __construct( bool $embedRefunds = false, bool $embedChargebacks = false, bool $includeQrCode = false, - bool $includeRemainderDetails = false, + bool $includeRemainderDetails = false ) { $this->embedCaptures = $embedCaptures; $this->embedRefunds = $embedRefunds; diff --git a/src/Http/Query/GetPaymentRefundQuery.php b/src/Http/Query/GetPaymentRefundQuery.php index 54b7b0e4..233a8261 100644 --- a/src/Http/Query/GetPaymentRefundQuery.php +++ b/src/Http/Query/GetPaymentRefundQuery.php @@ -9,7 +9,7 @@ class GetPaymentRefundQuery extends Query private bool $includePayment; public function __construct( - bool $includePayment = false, + bool $includePayment = false ) { $this->includePayment = $includePayment; } diff --git a/src/Http/Query/PaginatedQuery.php b/src/Http/Query/PaginatedQuery.php index 78820ec9..bab71b3d 100644 --- a/src/Http/Query/PaginatedQuery.php +++ b/src/Http/Query/PaginatedQuery.php @@ -10,7 +10,7 @@ class PaginatedQuery extends Query public function __construct( ?string $from = null, - ?int $limit = null, + ?int $limit = null ) { $this->from = $from; $this->limit = $limit; diff --git a/src/Http/Query/SortablePaginatedQuery.php b/src/Http/Query/SortablePaginatedQuery.php index 83e8b72d..7159b8c3 100644 --- a/src/Http/Query/SortablePaginatedQuery.php +++ b/src/Http/Query/SortablePaginatedQuery.php @@ -9,7 +9,7 @@ class SortablePaginatedQuery extends PaginatedQuery public function __construct( ?string $from = null, ?int $limit = null, - ?string $sort = null, + ?string $sort = null ) { parent::__construct($from, $limit); diff --git a/src/Http/Requests/CreateCustomerPaymentRequest.php b/src/Http/Requests/CreateCustomerPaymentRequest.php index a6f16fbd..352acbd6 100644 --- a/src/Http/Requests/CreateCustomerPaymentRequest.php +++ b/src/Http/Requests/CreateCustomerPaymentRequest.php @@ -14,7 +14,7 @@ class CreateCustomerPaymentRequest extends CreatePaymentRequest implements HasPa public function __construct( string $customerId, CreatePaymentPayload $payload, - ?CreatePaymentQuery $query = null, + ?CreatePaymentQuery $query = null ) { parent::__construct($payload, $query); diff --git a/tests/EndpointCollection/BalanceEndpointCollectionTest.php b/tests/EndpointCollection/BalanceEndpointCollectionTest.php index f71e5821..78df81ab 100644 --- a/tests/EndpointCollection/BalanceEndpointCollectionTest.php +++ b/tests/EndpointCollection/BalanceEndpointCollectionTest.php @@ -112,7 +112,7 @@ public function iterate() */ protected function assertBalance( Balance $balance, - string $balanceId, + string $balanceId ) { $this->assertInstanceOf(Balance::class, $balance); $this->assertEquals('balance', $balance->resource); diff --git a/tests/Fixtures/MockResponse.php b/tests/Fixtures/MockResponse.php index afe19bfd..eabcbcce 100644 --- a/tests/Fixtures/MockResponse.php +++ b/tests/Fixtures/MockResponse.php @@ -20,7 +20,7 @@ class MockResponse public function __construct( int $status = 200, string $body = '', - string $resourceId = '', + string $resourceId = '' ) { $this->status = $status; $this->resourceId = $resourceId; diff --git a/tests/Traits/ResolvesValuesTest.php b/tests/Traits/ResolvesValuesTest.php index 63b8ba91..752af8d7 100644 --- a/tests/Traits/ResolvesValuesTest.php +++ b/tests/Traits/ResolvesValuesTest.php @@ -38,7 +38,7 @@ class FooData implements Arrayable public function __construct( Bar $bar, - string $name, + string $name ) { $this->bar = $bar; $this->name = $name;