From ca4a799ed5556fa33b3b9d5b6ff7af25a9e10d19 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Mon, 9 Sep 2024 09:59:23 +0200 Subject: [PATCH] wip --- src/Http/Auth/AccessTokenAuthenticator.php | 2 +- src/Http/Auth/ApiKeyAuthenticator.php | 2 +- src/Http/Auth/BearerTokenAuthenticator.php | 2 +- src/Http/Payload/ApplicationFee.php | 2 +- src/Http/Payload/CreatePaymentPayload.php | 2 +- src/Http/Payload/OrderLine.php | 2 +- src/Http/Payload/PaymentRoute.php | 5 ++--- src/Http/Payload/RecurringBillingCycle.php | 2 +- src/Http/Payload/RefundRoute.php | 2 +- src/Http/Payload/UpdatePaymentPayload.php | 2 +- src/Http/Requests/DynamicDeleteRequest.php | 2 +- src/Http/Requests/GetPaginatedPaymentRefundsRequest.php | 2 +- src/Http/Requests/GetPaymentRequest.php | 2 +- 13 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/Http/Auth/AccessTokenAuthenticator.php b/src/Http/Auth/AccessTokenAuthenticator.php index 1b5f0c8e..2efd1b9d 100644 --- a/src/Http/Auth/AccessTokenAuthenticator.php +++ b/src/Http/Auth/AccessTokenAuthenticator.php @@ -7,7 +7,7 @@ class AccessTokenAuthenticator extends BearerTokenAuthenticator { public function __construct( - string $token, + string $token ) { if (! preg_match('/^access_\w+$/', trim($token))) { throw new ApiException("Invalid OAuth access token: '{$token}'. An access token must start with 'access_'."); diff --git a/src/Http/Auth/ApiKeyAuthenticator.php b/src/Http/Auth/ApiKeyAuthenticator.php index a017e0a1..6baaed1b 100644 --- a/src/Http/Auth/ApiKeyAuthenticator.php +++ b/src/Http/Auth/ApiKeyAuthenticator.php @@ -7,7 +7,7 @@ class ApiKeyAuthenticator extends BearerTokenAuthenticator { public function __construct( - string $token, + string $token ) { if (! preg_match('/^(live|test)_\w{30,}$/', trim($token))) { throw new ApiException("Invalid API key: '{$token}'. An API key must start with 'test_' or 'live_' and must be at least 30 characters long."); diff --git a/src/Http/Auth/BearerTokenAuthenticator.php b/src/Http/Auth/BearerTokenAuthenticator.php index 4cf05428..f0c45ea3 100644 --- a/src/Http/Auth/BearerTokenAuthenticator.php +++ b/src/Http/Auth/BearerTokenAuthenticator.php @@ -10,7 +10,7 @@ class BearerTokenAuthenticator implements Authenticator protected string $token; public function __construct( - string $token, + string $token ) { $this->token = trim($token); } diff --git a/src/Http/Payload/ApplicationFee.php b/src/Http/Payload/ApplicationFee.php index 870e4251..e2bf0b55 100644 --- a/src/Http/Payload/ApplicationFee.php +++ b/src/Http/Payload/ApplicationFee.php @@ -10,7 +10,7 @@ class ApplicationFee extends DataBag public function __construct( Money $amount, - string $description, + string $description ) { $this->amount = $amount; $this->description = $description; diff --git a/src/Http/Payload/CreatePaymentPayload.php b/src/Http/Payload/CreatePaymentPayload.php index b670506b..2aee4bf5 100644 --- a/src/Http/Payload/CreatePaymentPayload.php +++ b/src/Http/Payload/CreatePaymentPayload.php @@ -84,7 +84,7 @@ public function __construct( ?string $customerId = null, ?string $profileId = null, ?bool $testmode = null, - array $additional = [], + array $additional = [] ) { $this->description = $description; $this->amount = $amount; diff --git a/src/Http/Payload/OrderLine.php b/src/Http/Payload/OrderLine.php index f32fc66d..1de25c7c 100644 --- a/src/Http/Payload/OrderLine.php +++ b/src/Http/Payload/OrderLine.php @@ -48,7 +48,7 @@ public function __construct( ?Money $vatAmount = null, ?string $sku = null, ?string $imageUrl = null, - ?string $productUrl = null, + ?string $productUrl = null ) { $this->description = $description; $this->quantity = $quantity; diff --git a/src/Http/Payload/PaymentRoute.php b/src/Http/Payload/PaymentRoute.php index 0bad63da..6e759c1d 100644 --- a/src/Http/Payload/PaymentRoute.php +++ b/src/Http/Payload/PaymentRoute.php @@ -9,9 +9,8 @@ class PaymentRoute extends DataBag public function __construct( public readonly Money $amount, public readonly string $organizationId, - public readonly ?DateTimeInterface $delayUntil = null, - ) { - } + public readonly ?DateTimeInterface $delayUntil = null + ) {} public function data(): array { diff --git a/src/Http/Payload/RecurringBillingCycle.php b/src/Http/Payload/RecurringBillingCycle.php index bf19ea4b..5b82812a 100644 --- a/src/Http/Payload/RecurringBillingCycle.php +++ b/src/Http/Payload/RecurringBillingCycle.php @@ -27,7 +27,7 @@ public function __construct( ?string $description = null, ?Money $amount = null, ?int $times = null, - ?DateTimeInterface $startDate = null, + ?DateTimeInterface $startDate = null ) { $this->interval = $interval; $this->description = $description; diff --git a/src/Http/Payload/RefundRoute.php b/src/Http/Payload/RefundRoute.php index c2dc2432..240a5555 100644 --- a/src/Http/Payload/RefundRoute.php +++ b/src/Http/Payload/RefundRoute.php @@ -10,7 +10,7 @@ class RefundRoute extends DataBag public function __construct( Money $amount, - string $organizationId, + string $organizationId ) { $this->amount = $amount; $this->organizationId = $organizationId; diff --git a/src/Http/Payload/UpdatePaymentPayload.php b/src/Http/Payload/UpdatePaymentPayload.php index a5b5b497..f5774907 100644 --- a/src/Http/Payload/UpdatePaymentPayload.php +++ b/src/Http/Payload/UpdatePaymentPayload.php @@ -39,7 +39,7 @@ public function __construct( ?string $locale = null, ?string $restrictPaymentMethodsToCountry = null, ?bool $testmode = null, - array $additional = [], + array $additional = [] ) { $this->description = $description; $this->redirectUrl = $redirectUrl; diff --git a/src/Http/Requests/DynamicDeleteRequest.php b/src/Http/Requests/DynamicDeleteRequest.php index 35c06df7..4b8e85e0 100644 --- a/src/Http/Requests/DynamicDeleteRequest.php +++ b/src/Http/Requests/DynamicDeleteRequest.php @@ -23,7 +23,7 @@ public function __construct( string $url, string $resourceClass = '', ?bool $testmode = null, - array $body = [], + array $body = [] ) { parent::__construct($url, $resourceClass); diff --git a/src/Http/Requests/GetPaginatedPaymentRefundsRequest.php b/src/Http/Requests/GetPaginatedPaymentRefundsRequest.php index c531568e..f776503c 100644 --- a/src/Http/Requests/GetPaginatedPaymentRefundsRequest.php +++ b/src/Http/Requests/GetPaginatedPaymentRefundsRequest.php @@ -17,7 +17,7 @@ class GetPaginatedPaymentRefundsRequest extends PaginatedRequest public function __construct( string $paymentId, - ?GetPaginatedPaymentRefundQuery $query = null, + ?GetPaginatedPaymentRefundQuery $query = null ) { parent::__construct($query); diff --git a/src/Http/Requests/GetPaymentRequest.php b/src/Http/Requests/GetPaymentRequest.php index 63cdd56e..da4dee8d 100644 --- a/src/Http/Requests/GetPaymentRequest.php +++ b/src/Http/Requests/GetPaymentRequest.php @@ -26,7 +26,7 @@ class GetPaymentRequest extends Request public function __construct( string $id, - GetPaymentQuery $query, + GetPaymentQuery $query ) { $this->id = $id; $this->query = $query;