From a9b44dd8234b8c5f51337a299bee6a689473a436 Mon Sep 17 00:00:00 2001 From: Naoray Date: Tue, 3 Dec 2024 11:33:14 +0000 Subject: [PATCH] Fixes coding style --- .../ClientEndpointCollection.php | 2 +- .../ProfileMethodEndpointCollection.php | 36 ++++++++----------- .../SessionEndpointCollection.php | 11 +++--- .../SettlementEndpointCollection.php | 16 +++++---- .../GetAllPaymentMethodsQueryFactory.php | 1 - .../GetPaginatedClientQueryFactory.php | 1 + .../GetPaginatedRefundsQueryFactory.php | 1 + ...aginatedSettlementCapturesQueryFactory.php | 1 + .../GetPaymentRefundQueryFactory.php | 1 + src/Helpers/Arr.php | 2 +- src/Http/Query/GetClientQuery.php | 1 + src/Http/Query/GetPaginatedClientQuery.php | 2 ++ src/Http/Query/GetPaymentCaptureQuery.php | 1 + src/Http/Query/GetPaymentMethodQuery.php | 4 +++ src/Http/Requests/CreateSessionRequest.php | 1 + src/Http/Requests/GetSessionRequest.php | 1 + src/Http/Requests/GetTerminalRequest.php | 1 + src/Http/Requests/UpdateSessionRequest.php | 1 + src/MollieApiClient.php | 2 +- src/Traits/HasEndpoints.php | 2 +- .../BalanceEndpointCollectionTest.php | 2 +- .../BalanceReportEndpointCollectionTest.php | 8 ++--- ...lanceTransactionEndpointCollectionTest.php | 2 +- .../ChargebackEndpointCollectionTest.php | 2 +- .../ClientEndpointCollectionTest.php | 2 +- .../ClientLinkEndpointCollectionTest.php | 2 +- .../CustomerEndpointCollectionTest.php | 6 ++-- ...CustomerPaymentsEndpointCollectionTest.php | 3 +- .../InvoiceEndpointCollectionTest.php | 2 +- .../MandateEndpointCollectionTest.php | 2 +- .../MethodEndpointCollectionTest.php | 2 +- .../MethodIssuerEndpointCollectionTest.php | 4 +-- .../OnboardingEndpointCollectionTest.php | 2 +- .../OrganizationEndpointCollectionTest.php | 2 +- ...anizationPartnerEndpointCollectionTest.php | 2 +- .../PaymentCaptureEndpointCollectionTest.php | 6 ++-- ...aymentChargebackEndpointCollectionTest.php | 4 +-- .../PaymentEndpointCollectionTest.php | 2 +- .../PaymentLinkEndpointCollectionTest.php | 4 +-- ...ymentLinkPaymentEndpointCollectionTest.php | 2 +- .../PaymentRefundEndpointCollectionTest.php | 8 ++--- .../PaymentRouteEndpointCollectionTest.php | 2 +- .../PermissionEndpointCollectionTest.php | 2 +- .../ProfileEndpointCollectionTest.php | 4 +-- .../ProfileMethodEndpointCollectionTest.php | 4 +-- .../RefundEndpointCollectionTest.php | 2 +- .../SessionEndpointCollectionTest.php | 7 ++-- ...ettlementCaptureEndpointCollectionTest.php | 4 +-- ...lementChargebackEndpointCollectionTest.php | 2 +- ...ettlementPaymentEndpointCollectionTest.php | 2 +- ...SettlementRefundEndpointCollectionTest.php | 4 +-- .../SettlementsEndpointCollectionTest.php | 2 +- .../SubscriptionEndpointCollectionTest.php | 10 +++--- ...scriptionPaymentEndpointCollectionTest.php | 2 +- .../TerminalEndpointCollectionTest.php | 4 +-- .../WalletEndpointCollectionTest.php | 2 +- tests/Fixtures/Requests/DynamicGetRequest.php | 6 ++-- tests/Helpers/HandlersTest.php | 6 ++-- tests/Helpers/MiddlewareHandlersTest.php | 2 +- .../Adapter/GuzzleMollieHttpAdapterTest.php | 2 +- tests/MollieApiClientTest.php | 5 ++- tests/Resources/CursorCollectionTest.php | 2 +- 62 files changed, 122 insertions(+), 111 deletions(-) diff --git a/src/EndpointCollection/ClientEndpointCollection.php b/src/EndpointCollection/ClientEndpointCollection.php index 25309fc7..5ab558b2 100644 --- a/src/EndpointCollection/ClientEndpointCollection.php +++ b/src/EndpointCollection/ClientEndpointCollection.php @@ -27,7 +27,7 @@ class ClientEndpointCollection extends EndpointCollection */ public function get(string $id, $query = []): Client { - if (!$query instanceof GetClientQuery) { + if (! $query instanceof GetClientQuery) { $query = GetClientQueryFactory::new($query)->create(); } diff --git a/src/EndpointCollection/ProfileMethodEndpointCollection.php b/src/EndpointCollection/ProfileMethodEndpointCollection.php index ca8415a7..bf27872d 100644 --- a/src/EndpointCollection/ProfileMethodEndpointCollection.php +++ b/src/EndpointCollection/ProfileMethodEndpointCollection.php @@ -3,8 +3,8 @@ namespace Mollie\Api\EndpointCollection; use Mollie\Api\Exceptions\ApiException; -use Mollie\Api\Http\Requests\EnableProfileMethodRequest; use Mollie\Api\Http\Requests\DisableProfileMethodRequest; +use Mollie\Api\Http\Requests\EnableProfileMethodRequest; use Mollie\Api\Resources\Method; use Mollie\Api\Resources\Profile; @@ -14,8 +14,6 @@ class ProfileMethodEndpointCollection extends EndpointCollection * Enable a method for the provided Profile ID. * Alias of enableForId for backwards compatibility. * - * @param string $profileId - * @param string $id * @throws ApiException */ public function createForId(string $profileId, string $id): Method @@ -27,8 +25,6 @@ public function createForId(string $profileId, string $id): Method * Enable a method for the provided Profile object. * Alias of enableFor for backwards compatibility. * - * @param Profile $profile - * @param string $id * @throws ApiException */ public function createFor(Profile $profile, string $id): Method @@ -40,7 +36,6 @@ public function createFor(Profile $profile, string $id): Method * Enable a method for the current profile. * Alias of enable for backwards compatibility. * - * @param string $id * @throws ApiException */ public function createForCurrentProfile(string $id): Method @@ -51,8 +46,9 @@ public function createForCurrentProfile(string $id): Method /** * Enable a payment method for a specific profile. * - * @param string $profileId The profile's ID or 'me' for the current profile - * @param string $id The payment method ID + * @param string $profileId The profile's ID or 'me' for the current profile + * @param string $id The payment method ID + * * @throws ApiException */ public function enableForId(string $profileId, string $id): Method @@ -64,8 +60,8 @@ public function enableForId(string $profileId, string $id): Method /** * Enable a payment method for the provided Profile object. * - * @param Profile $profile - * @param string $id The payment method ID + * @param string $id The payment method ID + * * @throws ApiException */ public function enableFor(Profile $profile, string $id): Method @@ -76,7 +72,8 @@ public function enableFor(Profile $profile, string $id): Method /** * Enable a payment method for the current profile. * - * @param string $id The payment method ID + * @param string $id The payment method ID + * * @throws ApiException */ public function enable(string $id): Method @@ -88,8 +85,6 @@ public function enable(string $id): Method * Disable a method for the provided Profile ID. * Alias of disableForId for backwards compatibility. * - * @param string $profileId - * @param string $id * @throws ApiException */ public function deleteForId(string $profileId, string $id): void @@ -101,8 +96,6 @@ public function deleteForId(string $profileId, string $id): void * Disable a method for the provided Profile object. * Alias of disableFor for backwards compatibility. * - * @param Profile $profile - * @param string $id * @throws ApiException */ public function deleteFor(Profile $profile, string $id): void @@ -114,7 +107,6 @@ public function deleteFor(Profile $profile, string $id): void * Disable a method for the current profile. * Alias of disable for backwards compatibility. * - * @param string $id * @throws ApiException */ public function deleteForCurrentProfile(string $id): void @@ -125,8 +117,9 @@ public function deleteForCurrentProfile(string $id): void /** * Disable a payment method for a specific profile. * - * @param string $profileId The profile's ID or 'me' for the current profile - * @param string $id The payment method ID + * @param string $profileId The profile's ID or 'me' for the current profile + * @param string $id The payment method ID + * * @throws ApiException */ public function disableForId(string $profileId, string $id): void @@ -137,8 +130,8 @@ public function disableForId(string $profileId, string $id): void /** * Disable a payment method for the provided Profile object. * - * @param Profile $profile - * @param string $id The payment method ID + * @param string $id The payment method ID + * * @throws ApiException */ public function disableFor(Profile $profile, string $id): void @@ -149,7 +142,8 @@ public function disableFor(Profile $profile, string $id): void /** * Disable a payment method for the current profile. * - * @param string $id The payment method ID + * @param string $id The payment method ID + * * @throws ApiException */ public function disable(string $id): void diff --git a/src/EndpointCollection/SessionEndpointCollection.php b/src/EndpointCollection/SessionEndpointCollection.php index ac0e06cc..a9966805 100644 --- a/src/EndpointCollection/SessionEndpointCollection.php +++ b/src/EndpointCollection/SessionEndpointCollection.php @@ -5,6 +5,7 @@ use Mollie\Api\Exceptions\ApiException; use Mollie\Api\Factories\SortablePaginatedQueryFactory; use Mollie\Api\Http\Payload\AnyPayload; +use Mollie\Api\Http\Query\AnyQuery; use Mollie\Api\Http\Requests\CancelSessionRequest; use Mollie\Api\Http\Requests\CreateSessionRequest; use Mollie\Api\Http\Requests\GetPaginatedSessionsRequest; @@ -13,7 +14,6 @@ use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Session; use Mollie\Api\Resources\SessionCollection; -use Mollie\Api\Http\Query\AnyQuery; class SessionEndpointCollection extends EndpointCollection { @@ -22,8 +22,8 @@ class SessionEndpointCollection extends EndpointCollection * * Will throw a ApiException if the session id is invalid or the resource cannot be found. * - * @param string $sessionId - * @param array|AnyQuery $query + * @param array|AnyQuery $query + * * @throws ApiException */ public function get(string $sessionId, $query = []): Session @@ -39,8 +39,9 @@ public function get(string $sessionId, $query = []): Session /** * Creates a session in Mollie. * - * @param array|AnyPayload $payload - * @param array|AnyQuery $query + * @param array|AnyPayload $payload + * @param array|AnyQuery $query + * * @throws ApiException */ public function create($payload = [], $query = []): Session diff --git a/src/EndpointCollection/SettlementEndpointCollection.php b/src/EndpointCollection/SettlementEndpointCollection.php index dc0f2a8f..0d6536a8 100644 --- a/src/EndpointCollection/SettlementEndpointCollection.php +++ b/src/EndpointCollection/SettlementEndpointCollection.php @@ -18,7 +18,8 @@ class SettlementEndpointCollection extends EndpointCollection * * Will throw an ApiException if the settlement id is invalid or the resource cannot be found. * - * @param array|bool $testmode + * @param array|bool $testmode + * * @throws ApiException */ public function get(string $settlementId, $testmode = []): Settlement @@ -32,7 +33,8 @@ public function get(string $settlementId, $testmode = []): Settlement /** * Retrieve the next settlement from Mollie. * - * @param array|bool $testmode + * @param array|bool $testmode + * * @throws ApiException */ public function next($testmode = []): ?Settlement @@ -43,7 +45,8 @@ public function next($testmode = []): ?Settlement /** * Retrieve the open balance from Mollie. * - * @param array|bool $testmode + * @param array|bool $testmode + * * @throws ApiException */ public function open($testmode = []): ?Settlement @@ -54,7 +57,8 @@ public function open($testmode = []): ?Settlement /** * Retrieve a collection of settlements from Mollie. * - * @param string|null $from The first settlement ID you want to include in your list. + * @param string|null $from The first settlement ID you want to include in your list. + * * @throws ApiException */ public function page(?string $from = null, ?int $limit = null, array $filters = []): SettlementCollection @@ -74,8 +78,8 @@ public function page(?string $from = null, ?int $limit = null, array $filters = /** * Create an iterator for iterating over settlements retrieved from Mollie. * - * @param string|null $from The first settlement ID you want to include in your list. - * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). + * @param string|null $from The first settlement ID you want to include in your list. + * @param bool $iterateBackwards Set to true for reverse order iteration (default is false). */ public function iterator( ?string $from = null, diff --git a/src/Factories/GetAllPaymentMethodsQueryFactory.php b/src/Factories/GetAllPaymentMethodsQueryFactory.php index 58c0e272..2c82b718 100644 --- a/src/Factories/GetAllPaymentMethodsQueryFactory.php +++ b/src/Factories/GetAllPaymentMethodsQueryFactory.php @@ -4,7 +4,6 @@ use Mollie\Api\Http\Query\GetAllMethodsQuery; use Mollie\Api\Types\MethodQuery; -use Mollie\Api\Types\PaymentMethod; class GetAllPaymentMethodsQueryFactory extends Factory { diff --git a/src/Factories/GetPaginatedClientQueryFactory.php b/src/Factories/GetPaginatedClientQueryFactory.php index 6f42f9f2..bb0389ef 100644 --- a/src/Factories/GetPaginatedClientQueryFactory.php +++ b/src/Factories/GetPaginatedClientQueryFactory.php @@ -4,6 +4,7 @@ use Mollie\Api\Http\Query\GetPaginatedClientQuery; use Mollie\Api\Types\ClientQuery; + class GetPaginatedClientQueryFactory extends Factory { public function create(): GetPaginatedClientQuery diff --git a/src/Factories/GetPaginatedRefundsQueryFactory.php b/src/Factories/GetPaginatedRefundsQueryFactory.php index 188ba8bb..22c44151 100644 --- a/src/Factories/GetPaginatedRefundsQueryFactory.php +++ b/src/Factories/GetPaginatedRefundsQueryFactory.php @@ -4,6 +4,7 @@ use Mollie\Api\Http\Query\GetPaginatedRefundsQuery; use Mollie\Api\Types\PaymentIncludesQuery; + class GetPaginatedRefundsQueryFactory extends Factory { public function create(): GetPaginatedRefundsQuery diff --git a/src/Factories/GetPaginatedSettlementCapturesQueryFactory.php b/src/Factories/GetPaginatedSettlementCapturesQueryFactory.php index cbf53e8a..665547a4 100644 --- a/src/Factories/GetPaginatedSettlementCapturesQueryFactory.php +++ b/src/Factories/GetPaginatedSettlementCapturesQueryFactory.php @@ -4,6 +4,7 @@ use Mollie\Api\Http\Query\GetPaginatedSettlementCapturesQuery; use Mollie\Api\Types\PaymentIncludesQuery; + class GetPaginatedSettlementCapturesQueryFactory extends Factory { public function create(): GetPaginatedSettlementCapturesQuery diff --git a/src/Factories/GetPaymentRefundQueryFactory.php b/src/Factories/GetPaymentRefundQueryFactory.php index 879990e3..aac2e725 100644 --- a/src/Factories/GetPaymentRefundQueryFactory.php +++ b/src/Factories/GetPaymentRefundQueryFactory.php @@ -4,6 +4,7 @@ use Mollie\Api\Http\Query\GetPaymentRefundQuery; use Mollie\Api\Types\PaymentIncludesQuery; + class GetPaymentRefundQueryFactory extends Factory { public function create(): GetPaymentRefundQuery diff --git a/src/Helpers/Arr.php b/src/Helpers/Arr.php index bc17dade..511457c2 100644 --- a/src/Helpers/Arr.php +++ b/src/Helpers/Arr.php @@ -88,7 +88,7 @@ public static function wrap($array): array /** * Check if a value exists in an array of includes. - * @param array $array + * * @param string|array $key * @param mixed $value * diff --git a/src/Http/Query/GetClientQuery.php b/src/Http/Query/GetClientQuery.php index 98608b44..d8776ce0 100644 --- a/src/Http/Query/GetClientQuery.php +++ b/src/Http/Query/GetClientQuery.php @@ -8,6 +8,7 @@ class GetClientQuery extends Query { private bool $embedOrganization; + private bool $embedOnboarding; public function __construct( diff --git a/src/Http/Query/GetPaginatedClientQuery.php b/src/Http/Query/GetPaginatedClientQuery.php index 4435822c..094fb447 100644 --- a/src/Http/Query/GetPaginatedClientQuery.php +++ b/src/Http/Query/GetPaginatedClientQuery.php @@ -4,11 +4,13 @@ use Mollie\Api\Helpers\Arr; use Mollie\Api\Types\ClientQuery; + class GetPaginatedClientQuery extends Query { private PaginatedQuery $paginatedQuery; private bool $embedOrganization; + private bool $embedOnboarding; public function __construct( diff --git a/src/Http/Query/GetPaymentCaptureQuery.php b/src/Http/Query/GetPaymentCaptureQuery.php index 0501c22d..71275279 100644 --- a/src/Http/Query/GetPaymentCaptureQuery.php +++ b/src/Http/Query/GetPaymentCaptureQuery.php @@ -4,6 +4,7 @@ use Mollie\Api\Helpers\Arr; use Mollie\Api\Types\PaymentIncludesQuery; + class GetPaymentCaptureQuery extends Query { public bool $includePayment = false; diff --git a/src/Http/Query/GetPaymentMethodQuery.php b/src/Http/Query/GetPaymentMethodQuery.php index 86e9e7a5..90791dc6 100644 --- a/src/Http/Query/GetPaymentMethodQuery.php +++ b/src/Http/Query/GetPaymentMethodQuery.php @@ -8,9 +8,13 @@ class GetPaymentMethodQuery extends Query { private ?string $locale; + private ?string $currency; + private ?string $profileId; + private bool $includeIssuers; + private bool $includePricing; public function __construct( diff --git a/src/Http/Requests/CreateSessionRequest.php b/src/Http/Requests/CreateSessionRequest.php index 87568e76..cca61503 100644 --- a/src/Http/Requests/CreateSessionRequest.php +++ b/src/Http/Requests/CreateSessionRequest.php @@ -18,6 +18,7 @@ class CreateSessionRequest extends ResourceHydratableRequest implements HasPaylo public static string $targetResourceClass = Session::class; private AnyPayload $payload; + private AnyQuery $query; public function __construct(AnyPayload $payload, AnyQuery $query) diff --git a/src/Http/Requests/GetSessionRequest.php b/src/Http/Requests/GetSessionRequest.php index 63f570e3..80f6b9ec 100644 --- a/src/Http/Requests/GetSessionRequest.php +++ b/src/Http/Requests/GetSessionRequest.php @@ -13,6 +13,7 @@ class GetSessionRequest extends ResourceHydratableRequest public static string $targetResourceClass = Session::class; private string $sessionId; + private AnyQuery $query; public function __construct(string $sessionId, AnyQuery $query) diff --git a/src/Http/Requests/GetTerminalRequest.php b/src/Http/Requests/GetTerminalRequest.php index e777435d..6b7c5a1f 100644 --- a/src/Http/Requests/GetTerminalRequest.php +++ b/src/Http/Requests/GetTerminalRequest.php @@ -5,6 +5,7 @@ use Mollie\Api\Contracts\SupportsTestmodeInQuery; use Mollie\Api\Resources\Terminal; use Mollie\Api\Types\Method; + class GetTerminalRequest extends ResourceHydratableRequest implements SupportsTestmodeInQuery { protected static string $method = Method::GET; diff --git a/src/Http/Requests/UpdateSessionRequest.php b/src/Http/Requests/UpdateSessionRequest.php index 7ac512cf..6423d87e 100644 --- a/src/Http/Requests/UpdateSessionRequest.php +++ b/src/Http/Requests/UpdateSessionRequest.php @@ -17,6 +17,7 @@ class UpdateSessionRequest extends ResourceHydratableRequest implements HasPaylo public static string $targetResourceClass = Session::class; private string $sessionId; + private AnyPayload $payload; public function __construct(string $sessionId, AnyPayload $payload) diff --git a/src/MollieApiClient.php b/src/MollieApiClient.php index 65a8ca79..2e18fceb 100644 --- a/src/MollieApiClient.php +++ b/src/MollieApiClient.php @@ -33,6 +33,7 @@ use Mollie\Api\EndpointCollection\ProfileEndpointCollection; use Mollie\Api\EndpointCollection\ProfileMethodEndpointCollection; use Mollie\Api\EndpointCollection\RefundEndpointCollection; +use Mollie\Api\EndpointCollection\SessionEndpointCollection; use Mollie\Api\EndpointCollection\SettlementCaptureEndpointCollection; use Mollie\Api\EndpointCollection\SettlementChargebackEndpointCollection; use Mollie\Api\EndpointCollection\SettlementPaymentEndpointCollection; @@ -55,7 +56,6 @@ use Mollie\Api\Traits\HasMiddleware; use Mollie\Api\Traits\HasRequestProperties; use Mollie\Api\Traits\Initializable; -use Mollie\Api\EndpointCollection\SessionEndpointCollection; use Mollie\Api\Traits\SendsRequests; /** diff --git a/src/Traits/HasEndpoints.php b/src/Traits/HasEndpoints.php index 6fce32ba..8d9cfb20 100644 --- a/src/Traits/HasEndpoints.php +++ b/src/Traits/HasEndpoints.php @@ -28,6 +28,7 @@ use Mollie\Api\EndpointCollection\ProfileEndpointCollection; use Mollie\Api\EndpointCollection\ProfileMethodEndpointCollection; use Mollie\Api\EndpointCollection\RefundEndpointCollection; +use Mollie\Api\EndpointCollection\SessionEndpointCollection; use Mollie\Api\EndpointCollection\SettlementCaptureEndpointCollection; use Mollie\Api\EndpointCollection\SettlementChargebackEndpointCollection; use Mollie\Api\EndpointCollection\SettlementPaymentEndpointCollection; @@ -37,7 +38,6 @@ use Mollie\Api\EndpointCollection\SubscriptionPaymentEndpointCollection; use Mollie\Api\EndpointCollection\TerminalEndpointCollection; use Mollie\Api\EndpointCollection\WalletEndpointCollection; -use Mollie\Api\EndpointCollection\SessionEndpointCollection; use Mollie\Api\MollieApiClient; /** diff --git a/tests/EndpointCollection/BalanceEndpointCollectionTest.php b/tests/EndpointCollection/BalanceEndpointCollectionTest.php index 5589e524..f71e5821 100644 --- a/tests/EndpointCollection/BalanceEndpointCollectionTest.php +++ b/tests/EndpointCollection/BalanceEndpointCollectionTest.php @@ -9,11 +9,11 @@ use Mollie\Api\Http\Requests\GetPaginatedBalanceRequest; use Mollie\Api\Resources\Balance; use Mollie\Api\Resources\BalanceCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\Traits\AmountObjectTestHelpers; use Tests\Fixtures\Traits\LinkObjectTestHelpers; +use Tests\TestCase; class BalanceEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/BalanceReportEndpointCollectionTest.php b/tests/EndpointCollection/BalanceReportEndpointCollectionTest.php index 36f0af81..5878fa1c 100644 --- a/tests/EndpointCollection/BalanceReportEndpointCollectionTest.php +++ b/tests/EndpointCollection/BalanceReportEndpointCollectionTest.php @@ -7,11 +7,11 @@ use Mollie\Api\Http\Requests\GetBalanceReportRequest; use Mollie\Api\Resources\Balance; use Mollie\Api\Resources\BalanceReport; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\Traits\AmountObjectTestHelpers; use Tests\Fixtures\Traits\LinkObjectTestHelpers; +use Tests\TestCase; class BalanceReportEndpointCollectionTest extends TestCase { @@ -29,7 +29,7 @@ public function get_for_id() $report = $client->balanceReports->getForId('bal_gVMhHKqSSRYJyPsuoPNFH', [ 'from' => '2021-01-01', 'until' => '2021-02-01', - 'grouping' => 'transaction-categories' + 'grouping' => 'transaction-categories', ]); $this->assertBalanceReport($report, 'bal_gVMhHKqSSRYJyPsuoPNFH'); @@ -49,7 +49,7 @@ public function get_for_balance() $report = $client->balanceReports->getFor($balance, [ 'from' => '2021-01-01', 'until' => '2021-02-01', - 'grouping' => 'transaction-categories' + 'grouping' => 'transaction-categories', ]); $this->assertBalanceReport($report, 'bal_gVMhHKqSSRYJyPsuoPNFH'); @@ -66,7 +66,7 @@ public function get_for_primary() $report = $client->balanceReports->getForPrimary([ 'from' => '2024-01-01', 'until' => '2024-01-31', - 'grouping' => 'transaction-categories' + 'grouping' => 'transaction-categories', ]); $this->assertBalanceReport($report, 'bal_primary'); diff --git a/tests/EndpointCollection/BalanceTransactionEndpointCollectionTest.php b/tests/EndpointCollection/BalanceTransactionEndpointCollectionTest.php index 2a13224a..190c79ea 100644 --- a/tests/EndpointCollection/BalanceTransactionEndpointCollectionTest.php +++ b/tests/EndpointCollection/BalanceTransactionEndpointCollectionTest.php @@ -7,9 +7,9 @@ use Mollie\Api\Resources\Balance; use Mollie\Api\Resources\BalanceTransaction; use Mollie\Api\Resources\BalanceTransactionCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class BalanceTransactionEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/ChargebackEndpointCollectionTest.php b/tests/EndpointCollection/ChargebackEndpointCollectionTest.php index 257fe90f..237eb8c7 100644 --- a/tests/EndpointCollection/ChargebackEndpointCollectionTest.php +++ b/tests/EndpointCollection/ChargebackEndpointCollectionTest.php @@ -5,9 +5,9 @@ use Mollie\Api\Http\Requests\GetPaginatedChargebacksRequest; use Mollie\Api\Resources\Chargeback; use Mollie\Api\Resources\ChargebackCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class ChargebackEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/ClientEndpointCollectionTest.php b/tests/EndpointCollection/ClientEndpointCollectionTest.php index c8ac9434..fa73c9db 100644 --- a/tests/EndpointCollection/ClientEndpointCollectionTest.php +++ b/tests/EndpointCollection/ClientEndpointCollectionTest.php @@ -7,9 +7,9 @@ use Mollie\Api\Http\Requests\GetPaginatedClientRequest; use Mollie\Api\Resources\Client; use Mollie\Api\Resources\ClientCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class ClientEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/ClientLinkEndpointCollectionTest.php b/tests/EndpointCollection/ClientLinkEndpointCollectionTest.php index 2ccb50e6..c1f91fa5 100644 --- a/tests/EndpointCollection/ClientLinkEndpointCollectionTest.php +++ b/tests/EndpointCollection/ClientLinkEndpointCollectionTest.php @@ -7,9 +7,9 @@ use Mollie\Api\Http\Payload\OwnerAddress; use Mollie\Api\Http\Requests\CreateClientLinkRequest; use Mollie\Api\Resources\ClientLink; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class ClientLinkEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/CustomerEndpointCollectionTest.php b/tests/EndpointCollection/CustomerEndpointCollectionTest.php index 72096893..010b34ac 100644 --- a/tests/EndpointCollection/CustomerEndpointCollectionTest.php +++ b/tests/EndpointCollection/CustomerEndpointCollectionTest.php @@ -3,16 +3,16 @@ namespace Tests\EndpointCollection; use Mollie\Api\Http\Requests\CreateCustomerRequest; +use Mollie\Api\Http\Requests\DeleteCustomerRequest; +use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetCustomerRequest; use Mollie\Api\Http\Requests\GetPaginatedCustomerRequest; use Mollie\Api\Http\Requests\UpdateCustomerRequest; -use Mollie\Api\Http\Requests\DeleteCustomerRequest; -use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Resources\Customer; use Mollie\Api\Resources\CustomerCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class CustomerEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/CustomerPaymentsEndpointCollectionTest.php b/tests/EndpointCollection/CustomerPaymentsEndpointCollectionTest.php index 75e68ea8..e6d8d659 100644 --- a/tests/EndpointCollection/CustomerPaymentsEndpointCollectionTest.php +++ b/tests/EndpointCollection/CustomerPaymentsEndpointCollectionTest.php @@ -4,16 +4,15 @@ use Mollie\Api\Http\Payload\CreatePaymentPayload; use Mollie\Api\Http\Payload\Money; -use Mollie\Api\Http\Query\CreatePaymentQuery; use Mollie\Api\Http\Requests\CreateCustomerPaymentRequest; use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedCustomerPaymentsRequest; use Mollie\Api\Resources\Customer; use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\PaymentCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class CustomerPaymentsEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/InvoiceEndpointCollectionTest.php b/tests/EndpointCollection/InvoiceEndpointCollectionTest.php index 94f6e8bc..e2dfe10e 100644 --- a/tests/EndpointCollection/InvoiceEndpointCollectionTest.php +++ b/tests/EndpointCollection/InvoiceEndpointCollectionTest.php @@ -7,9 +7,9 @@ use Mollie\Api\Http\Requests\GetPaginatedInvoiceRequest; use Mollie\Api\Resources\Invoice; use Mollie\Api\Resources\InvoiceCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class InvoiceEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/MandateEndpointCollectionTest.php b/tests/EndpointCollection/MandateEndpointCollectionTest.php index 13251c84..482a4e56 100644 --- a/tests/EndpointCollection/MandateEndpointCollectionTest.php +++ b/tests/EndpointCollection/MandateEndpointCollectionTest.php @@ -11,9 +11,9 @@ use Mollie\Api\Resources\Customer; use Mollie\Api\Resources\Mandate; use Mollie\Api\Resources\MandateCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class MandateEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/MethodEndpointCollectionTest.php b/tests/EndpointCollection/MethodEndpointCollectionTest.php index eab70af8..4c0c2dee 100644 --- a/tests/EndpointCollection/MethodEndpointCollectionTest.php +++ b/tests/EndpointCollection/MethodEndpointCollectionTest.php @@ -7,9 +7,9 @@ use Mollie\Api\Http\Requests\GetPaymentMethodRequest; use Mollie\Api\Resources\Method; use Mollie\Api\Resources\MethodCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class MethodEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/MethodIssuerEndpointCollectionTest.php b/tests/EndpointCollection/MethodIssuerEndpointCollectionTest.php index 85dccdf5..db90e2a0 100644 --- a/tests/EndpointCollection/MethodIssuerEndpointCollectionTest.php +++ b/tests/EndpointCollection/MethodIssuerEndpointCollectionTest.php @@ -2,12 +2,12 @@ namespace Tests\EndpointCollection; -use Mollie\Api\Http\Requests\EnableMethodIssuerRequest; use Mollie\Api\Http\Requests\DisableMethodIssuerRequest; +use Mollie\Api\Http\Requests\EnableMethodIssuerRequest; use Mollie\Api\Resources\Issuer; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class MethodIssuerEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/OnboardingEndpointCollectionTest.php b/tests/EndpointCollection/OnboardingEndpointCollectionTest.php index 8057494a..04d588c1 100644 --- a/tests/EndpointCollection/OnboardingEndpointCollectionTest.php +++ b/tests/EndpointCollection/OnboardingEndpointCollectionTest.php @@ -4,9 +4,9 @@ use Mollie\Api\Http\Requests\GetOnboardingRequest; use Mollie\Api\Resources\Onboarding; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class OnboardingEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/OrganizationEndpointCollectionTest.php b/tests/EndpointCollection/OrganizationEndpointCollectionTest.php index f7cb1a51..37478a9c 100644 --- a/tests/EndpointCollection/OrganizationEndpointCollectionTest.php +++ b/tests/EndpointCollection/OrganizationEndpointCollectionTest.php @@ -6,9 +6,9 @@ use Mollie\Api\Http\Requests\GetOrganizationRequest; use Mollie\Api\Resources\Organization; use Mollie\Api\Resources\Partner; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class OrganizationEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/OrganizationPartnerEndpointCollectionTest.php b/tests/EndpointCollection/OrganizationPartnerEndpointCollectionTest.php index 15e45764..789ef496 100644 --- a/tests/EndpointCollection/OrganizationPartnerEndpointCollectionTest.php +++ b/tests/EndpointCollection/OrganizationPartnerEndpointCollectionTest.php @@ -4,9 +4,9 @@ use Mollie\Api\Http\Requests\GetOrganizationPartnerStatusRequest; use Mollie\Api\Resources\Partner; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class OrganizationPartnerEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/PaymentCaptureEndpointCollectionTest.php b/tests/EndpointCollection/PaymentCaptureEndpointCollectionTest.php index 2faa59fd..520da520 100644 --- a/tests/EndpointCollection/PaymentCaptureEndpointCollectionTest.php +++ b/tests/EndpointCollection/PaymentCaptureEndpointCollectionTest.php @@ -6,13 +6,13 @@ use Mollie\Api\Http\Payload\Money; use Mollie\Api\Http\Requests\CreatePaymentCaptureRequest; use Mollie\Api\Http\Requests\DynamicGetRequest; -use Mollie\Api\Http\Requests\GetPaymentCaptureRequest; use Mollie\Api\Http\Requests\GetPaginatedPaymentCapturesRequest; +use Mollie\Api\Http\Requests\GetPaymentCaptureRequest; use Mollie\Api\Resources\Capture; use Mollie\Api\Resources\CaptureCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class PaymentCaptureEndpointCollectionTest extends TestCase { @@ -67,7 +67,7 @@ public function iterator_for_id() { $client = new MockClient([ GetPaginatedPaymentCapturesRequest::class => new MockResponse(200, 'capture-list'), - DynamicGetRequest::class => new MockResponse(200, 'empty-list','captures'), + DynamicGetRequest::class => new MockResponse(200, 'empty-list', 'captures'), ]); foreach ($client->paymentCaptures->iteratorForId('tr_7UhSN1zuXS') as $capture) { diff --git a/tests/EndpointCollection/PaymentChargebackEndpointCollectionTest.php b/tests/EndpointCollection/PaymentChargebackEndpointCollectionTest.php index ad261d38..09861ed4 100644 --- a/tests/EndpointCollection/PaymentChargebackEndpointCollectionTest.php +++ b/tests/EndpointCollection/PaymentChargebackEndpointCollectionTest.php @@ -2,13 +2,13 @@ namespace Tests\EndpointCollection; -use Mollie\Api\Http\Requests\GetPaymentChargebackRequest; use Mollie\Api\Http\Requests\GetPaginatedPaymentChargebacksRequest; +use Mollie\Api\Http\Requests\GetPaymentChargebackRequest; use Mollie\Api\Resources\Chargeback; use Mollie\Api\Resources\ChargebackCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class PaymentChargebackEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/PaymentEndpointCollectionTest.php b/tests/EndpointCollection/PaymentEndpointCollectionTest.php index f78c9473..2ae5a85a 100644 --- a/tests/EndpointCollection/PaymentEndpointCollectionTest.php +++ b/tests/EndpointCollection/PaymentEndpointCollectionTest.php @@ -16,9 +16,9 @@ use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\PaymentCollection; use Mollie\Api\Resources\Refund; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class PaymentEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/PaymentLinkEndpointCollectionTest.php b/tests/EndpointCollection/PaymentLinkEndpointCollectionTest.php index 6b64c32e..cebf2bab 100644 --- a/tests/EndpointCollection/PaymentLinkEndpointCollectionTest.php +++ b/tests/EndpointCollection/PaymentLinkEndpointCollectionTest.php @@ -9,14 +9,14 @@ use Mollie\Api\Http\Requests\CreatePaymentLinkRequest; use Mollie\Api\Http\Requests\DeletePaymentLinkRequest; use Mollie\Api\Http\Requests\DynamicGetRequest; -use Mollie\Api\Http\Requests\GetPaymentLinkRequest; use Mollie\Api\Http\Requests\GetPaginatedPaymentLinksRequest; +use Mollie\Api\Http\Requests\GetPaymentLinkRequest; use Mollie\Api\Http\Requests\UpdatePaymentLinkRequest; use Mollie\Api\Resources\PaymentLink; use Mollie\Api\Resources\PaymentLinkCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class PaymentLinkEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/PaymentLinkPaymentEndpointCollectionTest.php b/tests/EndpointCollection/PaymentLinkPaymentEndpointCollectionTest.php index 62889bb3..6edba93f 100644 --- a/tests/EndpointCollection/PaymentLinkPaymentEndpointCollectionTest.php +++ b/tests/EndpointCollection/PaymentLinkPaymentEndpointCollectionTest.php @@ -6,9 +6,9 @@ use Mollie\Api\Http\Requests\GetPaginatedPaymentLinkPaymentsRequest; use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\PaymentCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class PaymentLinkPaymentEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/PaymentRefundEndpointCollectionTest.php b/tests/EndpointCollection/PaymentRefundEndpointCollectionTest.php index 70e4a7fe..99673c57 100644 --- a/tests/EndpointCollection/PaymentRefundEndpointCollectionTest.php +++ b/tests/EndpointCollection/PaymentRefundEndpointCollectionTest.php @@ -2,17 +2,17 @@ namespace Tests\EndpointCollection; -use Mollie\Api\Http\Requests\CreatePaymentRefundRequest; -use Mollie\Api\Http\Requests\GetPaymentRefundRequest; -use Mollie\Api\Http\Requests\GetPaginatedPaymentRefundsRequest; use Mollie\Api\Http\Requests\CancelPaymentRefundRequest; +use Mollie\Api\Http\Requests\CreatePaymentRefundRequest; use Mollie\Api\Http\Requests\DynamicGetRequest; +use Mollie\Api\Http\Requests\GetPaginatedPaymentRefundsRequest; +use Mollie\Api\Http\Requests\GetPaymentRefundRequest; use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\Refund; use Mollie\Api\Resources\RefundCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class PaymentRefundEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/PaymentRouteEndpointCollectionTest.php b/tests/EndpointCollection/PaymentRouteEndpointCollectionTest.php index e8d9f835..5842509a 100644 --- a/tests/EndpointCollection/PaymentRouteEndpointCollectionTest.php +++ b/tests/EndpointCollection/PaymentRouteEndpointCollectionTest.php @@ -4,9 +4,9 @@ use Mollie\Api\Http\Requests\UpdatePaymentRouteRequest; use Mollie\Api\Resources\Route; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class PaymentRouteEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/PermissionEndpointCollectionTest.php b/tests/EndpointCollection/PermissionEndpointCollectionTest.php index ae2f1d67..96274fa3 100644 --- a/tests/EndpointCollection/PermissionEndpointCollectionTest.php +++ b/tests/EndpointCollection/PermissionEndpointCollectionTest.php @@ -6,9 +6,9 @@ use Mollie\Api\Http\Requests\ListPermissionsRequest; use Mollie\Api\Resources\Permission; use Mollie\Api\Resources\PermissionCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class PermissionEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/ProfileEndpointCollectionTest.php b/tests/EndpointCollection/ProfileEndpointCollectionTest.php index ecadaa46..c3f317c5 100644 --- a/tests/EndpointCollection/ProfileEndpointCollectionTest.php +++ b/tests/EndpointCollection/ProfileEndpointCollectionTest.php @@ -7,14 +7,14 @@ use Mollie\Api\Http\Requests\CreateProfileRequest; use Mollie\Api\Http\Requests\DeleteProfileRequest; use Mollie\Api\Http\Requests\DynamicGetRequest; -use Mollie\Api\Http\Requests\GetProfileRequest; use Mollie\Api\Http\Requests\GetPaginatedProfilesRequest; +use Mollie\Api\Http\Requests\GetProfileRequest; use Mollie\Api\Http\Requests\UpdateProfileRequest; use Mollie\Api\Resources\Profile; use Mollie\Api\Resources\ProfileCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class ProfileEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/ProfileMethodEndpointCollectionTest.php b/tests/EndpointCollection/ProfileMethodEndpointCollectionTest.php index cbf87e2b..8d83d210 100644 --- a/tests/EndpointCollection/ProfileMethodEndpointCollectionTest.php +++ b/tests/EndpointCollection/ProfileMethodEndpointCollectionTest.php @@ -2,12 +2,12 @@ namespace Tests\EndpointCollection; -use Mollie\Api\Http\Requests\EnableProfileMethodRequest; use Mollie\Api\Http\Requests\DisableProfileMethodRequest; +use Mollie\Api\Http\Requests\EnableProfileMethodRequest; use Mollie\Api\Resources\Method; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class ProfileMethodEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/RefundEndpointCollectionTest.php b/tests/EndpointCollection/RefundEndpointCollectionTest.php index 2a50a47c..aec800e1 100644 --- a/tests/EndpointCollection/RefundEndpointCollectionTest.php +++ b/tests/EndpointCollection/RefundEndpointCollectionTest.php @@ -6,9 +6,9 @@ use Mollie\Api\Http\Requests\GetPaginatedRefundsRequest; use Mollie\Api\Resources\Refund; use Mollie\Api\Resources\RefundCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class RefundEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/SessionEndpointCollectionTest.php b/tests/EndpointCollection/SessionEndpointCollectionTest.php index ebf69071..9f7d2398 100644 --- a/tests/EndpointCollection/SessionEndpointCollectionTest.php +++ b/tests/EndpointCollection/SessionEndpointCollectionTest.php @@ -13,9 +13,9 @@ use Mollie\Api\Http\Requests\UpdateSessionRequest; use Mollie\Api\Resources\Session; use Mollie\Api\Resources\SessionCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class SessionEndpointCollectionTest extends TestCase { @@ -42,7 +42,7 @@ public function create() /** @var Session $session */ $session = $client->sessions->create(new AnyPayload([ 'amount' => new Money('EUR', '10.00'), - 'description' => 'Test Session' + 'description' => 'Test Session', ])); $this->assertSession($session); @@ -57,7 +57,7 @@ public function update() /** @var Session $session */ $session = $client->sessions->update('ses_123', new AnyPayload([ - 'description' => 'Updated Session' + 'description' => 'Updated Session', ])); $this->assertSession($session); @@ -106,6 +106,7 @@ public function iterator() $this->assertSession($session); } } + protected function assertSession(Session $session) { $this->assertInstanceOf(Session::class, $session); diff --git a/tests/EndpointCollection/SettlementCaptureEndpointCollectionTest.php b/tests/EndpointCollection/SettlementCaptureEndpointCollectionTest.php index 4cd76fa3..556d1bac 100644 --- a/tests/EndpointCollection/SettlementCaptureEndpointCollectionTest.php +++ b/tests/EndpointCollection/SettlementCaptureEndpointCollectionTest.php @@ -2,14 +2,14 @@ namespace Tests\EndpointCollection; -use Mollie\Api\Http\Requests\GetPaginatedSettlementCapturesRequest; use Mollie\Api\Http\Requests\DynamicGetRequest; +use Mollie\Api\Http\Requests\GetPaginatedSettlementCapturesRequest; use Mollie\Api\Resources\Capture; use Mollie\Api\Resources\CaptureCollection; use Mollie\Api\Resources\Settlement; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class SettlementCaptureEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/SettlementChargebackEndpointCollectionTest.php b/tests/EndpointCollection/SettlementChargebackEndpointCollectionTest.php index 8ce917e9..78f99be1 100644 --- a/tests/EndpointCollection/SettlementChargebackEndpointCollectionTest.php +++ b/tests/EndpointCollection/SettlementChargebackEndpointCollectionTest.php @@ -6,9 +6,9 @@ use Mollie\Api\Resources\Chargeback; use Mollie\Api\Resources\ChargebackCollection; use Mollie\Api\Resources\Settlement; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class SettlementChargebackEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/SettlementPaymentEndpointCollectionTest.php b/tests/EndpointCollection/SettlementPaymentEndpointCollectionTest.php index efc068b4..2e6bc106 100644 --- a/tests/EndpointCollection/SettlementPaymentEndpointCollectionTest.php +++ b/tests/EndpointCollection/SettlementPaymentEndpointCollectionTest.php @@ -7,9 +7,9 @@ use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\PaymentCollection; use Mollie\Api\Resources\Settlement; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class SettlementPaymentEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/SettlementRefundEndpointCollectionTest.php b/tests/EndpointCollection/SettlementRefundEndpointCollectionTest.php index 3c35b10e..b0503492 100644 --- a/tests/EndpointCollection/SettlementRefundEndpointCollectionTest.php +++ b/tests/EndpointCollection/SettlementRefundEndpointCollectionTest.php @@ -2,14 +2,14 @@ namespace Tests\EndpointCollection; +use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedSettlementRefundsRequest; use Mollie\Api\Resources\Refund; use Mollie\Api\Resources\RefundCollection; use Mollie\Api\Resources\Settlement; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; -use Mollie\Api\Http\Requests\DynamicGetRequest; +use Tests\TestCase; class SettlementRefundEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/SettlementsEndpointCollectionTest.php b/tests/EndpointCollection/SettlementsEndpointCollectionTest.php index 2ea3e805..d95c13c7 100644 --- a/tests/EndpointCollection/SettlementsEndpointCollectionTest.php +++ b/tests/EndpointCollection/SettlementsEndpointCollectionTest.php @@ -7,9 +7,9 @@ use Mollie\Api\Http\Requests\GetSettlementRequest; use Mollie\Api\Resources\Settlement; use Mollie\Api\Resources\SettlementCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class SettlementsEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/SubscriptionEndpointCollectionTest.php b/tests/EndpointCollection/SubscriptionEndpointCollectionTest.php index 91c8039e..21eb9f93 100644 --- a/tests/EndpointCollection/SubscriptionEndpointCollectionTest.php +++ b/tests/EndpointCollection/SubscriptionEndpointCollectionTest.php @@ -2,19 +2,19 @@ namespace Tests\EndpointCollection; +use Mollie\Api\Http\Requests\CancelSubscriptionRequest; use Mollie\Api\Http\Requests\CreateSubscriptionRequest; -use Mollie\Api\Http\Requests\GetSubscriptionRequest; +use Mollie\Api\Http\Requests\DynamicGetRequest; +use Mollie\Api\Http\Requests\GetAllPaginatedSubscriptionsRequest; use Mollie\Api\Http\Requests\GetPaginatedSubscriptionsRequest; +use Mollie\Api\Http\Requests\GetSubscriptionRequest; use Mollie\Api\Http\Requests\UpdateSubscriptionRequest; -use Mollie\Api\Http\Requests\CancelSubscriptionRequest; use Mollie\Api\Resources\Customer; use Mollie\Api\Resources\Subscription; use Mollie\Api\Resources\SubscriptionCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; -use Mollie\Api\Http\Requests\DynamicGetRequest; -use Mollie\Api\Http\Requests\GetAllPaginatedSubscriptionsRequest; +use Tests\TestCase; class SubscriptionEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/SubscriptionPaymentEndpointCollectionTest.php b/tests/EndpointCollection/SubscriptionPaymentEndpointCollectionTest.php index 1d2c8dc4..c9e1e48b 100644 --- a/tests/EndpointCollection/SubscriptionPaymentEndpointCollectionTest.php +++ b/tests/EndpointCollection/SubscriptionPaymentEndpointCollectionTest.php @@ -7,9 +7,9 @@ use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\PaymentCollection; use Mollie\Api\Resources\Subscription; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class SubscriptionPaymentEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/TerminalEndpointCollectionTest.php b/tests/EndpointCollection/TerminalEndpointCollectionTest.php index 291324c8..337af014 100644 --- a/tests/EndpointCollection/TerminalEndpointCollectionTest.php +++ b/tests/EndpointCollection/TerminalEndpointCollectionTest.php @@ -2,14 +2,14 @@ namespace Tests\EndpointCollection; +use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedTerminalsRequest; use Mollie\Api\Http\Requests\GetTerminalRequest; -use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Resources\Terminal; use Mollie\Api\Resources\TerminalCollection; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class TerminalEndpointCollectionTest extends TestCase { diff --git a/tests/EndpointCollection/WalletEndpointCollectionTest.php b/tests/EndpointCollection/WalletEndpointCollectionTest.php index 8db783c0..f3be60d2 100644 --- a/tests/EndpointCollection/WalletEndpointCollectionTest.php +++ b/tests/EndpointCollection/WalletEndpointCollectionTest.php @@ -4,9 +4,9 @@ use Mollie\Api\Http\Requests\ApplePayPaymentSessionRequest; use Mollie\Api\Resources\AnyResource; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\TestCase; class WalletEndpointCollectionTest extends TestCase { diff --git a/tests/Fixtures/Requests/DynamicGetRequest.php b/tests/Fixtures/Requests/DynamicGetRequest.php index 710eee70..189ae935 100644 --- a/tests/Fixtures/Requests/DynamicGetRequest.php +++ b/tests/Fixtures/Requests/DynamicGetRequest.php @@ -2,9 +2,7 @@ namespace Tests\Fixtures\Requests; -use Mollie\Api\Http\Requests\DynamicGetRequest as BaseDynamicGetRequest; use Mollie\Api\Contracts\SupportsTestmodeInQuery; +use Mollie\Api\Http\Requests\DynamicGetRequest as BaseDynamicGetRequest; -class DynamicGetRequest extends BaseDynamicGetRequest implements SupportsTestmodeInQuery -{ -} +class DynamicGetRequest extends BaseDynamicGetRequest implements SupportsTestmodeInQuery {} diff --git a/tests/Helpers/HandlersTest.php b/tests/Helpers/HandlersTest.php index 069379c9..218918d0 100644 --- a/tests/Helpers/HandlersTest.php +++ b/tests/Helpers/HandlersTest.php @@ -13,7 +13,7 @@ class HandlersTest extends TestCase /** @test */ public function add(): void { - $handlers = new Handlers(); + $handlers = new Handlers; $handlers->add(fn () => null); $this->assertCount(1, $handlers->getHandlers()); @@ -24,7 +24,7 @@ public function handlers_are_executed_in_the_correct_order(): void { $output = []; - $handlers = new Handlers(); + $handlers = new Handlers; $handlers->add(function ($value) use (&$output) { $output[] = 1; @@ -48,7 +48,7 @@ public function handlers_are_executed_in_the_correct_order(): void } } -class TestViableResponse implements ViableResponse, Arrayable +class TestViableResponse implements Arrayable, ViableResponse { public array $output = []; diff --git a/tests/Helpers/MiddlewareHandlersTest.php b/tests/Helpers/MiddlewareHandlersTest.php index f2b4005a..48c4c8bb 100644 --- a/tests/Helpers/MiddlewareHandlersTest.php +++ b/tests/Helpers/MiddlewareHandlersTest.php @@ -5,8 +5,8 @@ use Mollie\Api\Http\PendingRequest; use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Response; -use Tests\TestCase; use Tests\Fixtures\MockClient; +use Tests\TestCase; class MiddlewareHandlersTest extends TestCase { diff --git a/tests/Http/Adapter/GuzzleMollieHttpAdapterTest.php b/tests/Http/Adapter/GuzzleMollieHttpAdapterTest.php index cf7cc322..0ef3d921 100644 --- a/tests/Http/Adapter/GuzzleMollieHttpAdapterTest.php +++ b/tests/Http/Adapter/GuzzleMollieHttpAdapterTest.php @@ -10,9 +10,9 @@ use Mollie\Api\Http\Adapter\GuzzleMollieHttpAdapter; use Mollie\Api\Http\PendingRequest; use Mollie\Api\Http\Requests\DynamicGetRequest; -use Tests\TestCase; use Psr\Http\Message\RequestInterface; use Tests\Fixtures\MockClient; +use Tests\TestCase; class GuzzleMollieHttpAdapterTest extends TestCase { diff --git a/tests/MollieApiClientTest.php b/tests/MollieApiClientTest.php index b9dc9278..f59c4709 100644 --- a/tests/MollieApiClientTest.php +++ b/tests/MollieApiClientTest.php @@ -12,15 +12,14 @@ use Mollie\Api\Http\Payload\Money; use Mollie\Api\Http\Payload\UpdatePaymentPayload; use Mollie\Api\Http\Requests\CreatePaymentRequest; -use Tests\Fixtures\Requests\DynamicDeleteRequest; -use Tests\Fixtures\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\UpdatePaymentRequest; use Mollie\Api\Http\Response as HttpResponse; use Mollie\Api\Idempotency\FakeIdempotencyKeyGenerator; use Mollie\Api\MollieApiClient; -use Tests\TestCase; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; +use Tests\Fixtures\Requests\DynamicDeleteRequest; +use Tests\Fixtures\Requests\DynamicGetRequest; class MollieApiClientTest extends TestCase { diff --git a/tests/Resources/CursorCollectionTest.php b/tests/Resources/CursorCollectionTest.php index 1c32eee5..60b476ae 100644 --- a/tests/Resources/CursorCollectionTest.php +++ b/tests/Resources/CursorCollectionTest.php @@ -5,11 +5,11 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\PaymentCollection; -use Tests\TestCase; use stdClass; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; +use Tests\TestCase; class CursorCollectionTest extends TestCase {