Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Naoray committed Sep 9, 2024
1 parent bd15bf4 commit ca4a799
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Http/Auth/AccessTokenAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_'.");
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Auth/ApiKeyAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Auth/BearerTokenAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class BearerTokenAuthenticator implements Authenticator
protected string $token;

public function __construct(
string $token,
string $token
) {
$this->token = trim($token);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Payload/ApplicationFee.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ApplicationFee extends DataBag

public function __construct(
Money $amount,
string $description,
string $description
) {
$this->amount = $amount;
$this->description = $description;
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Payload/CreatePaymentPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Payload/OrderLine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions src/Http/Payload/PaymentRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Payload/RecurringBillingCycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Payload/RefundRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class RefundRoute extends DataBag

public function __construct(
Money $amount,
string $organizationId,
string $organizationId
) {
$this->amount = $amount;
$this->organizationId = $organizationId;
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Payload/UpdatePaymentPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Requests/DynamicDeleteRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(
string $url,
string $resourceClass = '',
?bool $testmode = null,
array $body = [],
array $body = []
) {
parent::__construct($url, $resourceClass);

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Requests/GetPaginatedPaymentRefundsRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class GetPaginatedPaymentRefundsRequest extends PaginatedRequest

public function __construct(
string $paymentId,
?GetPaginatedPaymentRefundQuery $query = null,
?GetPaginatedPaymentRefundQuery $query = null
) {
parent::__construct($query);

Expand Down
2 changes: 1 addition & 1 deletion src/Http/Requests/GetPaymentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class GetPaymentRequest extends Request

public function __construct(
string $id,
GetPaymentQuery $query,
GetPaymentQuery $query
) {
$this->id = $id;
$this->query = $query;
Expand Down

0 comments on commit ca4a799

Please sign in to comment.