diff --git a/src/Http/Requests/GetAllMethodsRequest.php b/src/Http/Requests/GetAllMethodsRequest.php index ee5b11ed..7d600411 100644 --- a/src/Http/Requests/GetAllMethodsRequest.php +++ b/src/Http/Requests/GetAllMethodsRequest.php @@ -22,7 +22,7 @@ class GetAllMethodsRequest extends ResourceHydratableRequest public function __construct(?GetAllMethodsQuery $query = null) { - $this->query = $query ?: new GetAllMethodsQuery(); + $this->query = $query ?: new GetAllMethodsQuery; } protected function defaultQuery(): array diff --git a/src/Resources/CursorCollection.php b/src/Resources/CursorCollection.php index 6959751d..498f9fc2 100644 --- a/src/Resources/CursorCollection.php +++ b/src/Resources/CursorCollection.php @@ -12,6 +12,7 @@ abstract class CursorCollection extends ResourceCollection * Return the next set of resources when available * * @return null|CursorCollection|Response + * * @throws \Mollie\Api\Exceptions\ApiException */ public function next() @@ -27,6 +28,7 @@ public function next() * Return the previous set of resources when available * * @return null|CursorCollection|Response + * * @throws \Mollie\Api\Exceptions\ApiException */ public function previous() diff --git a/src/Traits/DelegatesToResource.php b/src/Traits/DelegatesToResource.php index 3d3824a7..1ef396d8 100644 --- a/src/Traits/DelegatesToResource.php +++ b/src/Traits/DelegatesToResource.php @@ -9,6 +9,7 @@ /** * @mixin Response + * * @property null|BaseResource|ResourceCollection $resource */ trait DelegatesToResource @@ -49,7 +50,7 @@ public function __get($key) { $this->ensureResourceIsLoaded(); - if (!property_exists($this->resource, $key)) { + if (! property_exists($this->resource, $key)) { throw new \InvalidArgumentException("Property {$key} does not exist on resource."); } diff --git a/tests/EndpointCollection/ChargebackEndpointCollectionTest.php b/tests/EndpointCollection/ChargebackEndpointCollectionTest.php index 000cc813..a0ad4190 100644 --- a/tests/EndpointCollection/ChargebackEndpointCollectionTest.php +++ b/tests/EndpointCollection/ChargebackEndpointCollectionTest.php @@ -35,7 +35,7 @@ public function iterator() { $client = new MockClient([ GetPaginatedChargebacksRequest::class => new MockResponse(200, 'chargeback-list'), - DynamicGetRequest::class => new MockResponse(200, 'empty-list','chargebacks'), + DynamicGetRequest::class => new MockResponse(200, 'empty-list', 'chargebacks'), ]); foreach ($client->chargebacks->iterator() as $chargeback) { diff --git a/tests/EndpointCollection/PaymentChargebackEndpointCollectionTest.php b/tests/EndpointCollection/PaymentChargebackEndpointCollectionTest.php index b4a28673..a25cffb9 100644 --- a/tests/EndpointCollection/PaymentChargebackEndpointCollectionTest.php +++ b/tests/EndpointCollection/PaymentChargebackEndpointCollectionTest.php @@ -50,7 +50,7 @@ public function iterator_for_id() { $client = new MockClient([ GetPaginatedPaymentChargebacksRequest::class => new MockResponse(200, 'chargeback-list'), - DynamicGetRequest::class => new MockResponse(200, 'empty-list','chargebacks'), + DynamicGetRequest::class => new MockResponse(200, 'empty-list', 'chargebacks'), ]); foreach ($client->paymentChargebacks->iteratorForId('tr_7UhSN1zuXS') as $chargeback) { diff --git a/tests/EndpointCollection/SettlementChargebackEndpointCollectionTest.php b/tests/EndpointCollection/SettlementChargebackEndpointCollectionTest.php index 6b6ac696..9d27b586 100644 --- a/tests/EndpointCollection/SettlementChargebackEndpointCollectionTest.php +++ b/tests/EndpointCollection/SettlementChargebackEndpointCollectionTest.php @@ -39,7 +39,7 @@ public function iterator_for() { $client = new MockClient([ GetPaginatedSettlementChargebacksRequest::class => new MockResponse(200, 'chargeback-list'), - DynamicGetRequest::class => new MockResponse(200, 'empty-list','chargebacks'), + DynamicGetRequest::class => new MockResponse(200, 'empty-list', 'chargebacks'), ]); $settlement = new Settlement($client); diff --git a/tests/Http/Adapter/MockMollieHttpAdapter.php b/tests/Http/Adapter/MockMollieHttpAdapter.php index 6f155f37..d009464e 100644 --- a/tests/Http/Adapter/MockMollieHttpAdapter.php +++ b/tests/Http/Adapter/MockMollieHttpAdapter.php @@ -7,9 +7,9 @@ use Mollie\Api\Http\PendingRequest; use Mollie\Api\Http\Response; use Mollie\Api\Traits\HasDefaultFactories; +use PHPUnit\Framework\Assert as PHPUnit; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; -use PHPUnit\Framework\Assert as PHPUnit; class MockMollieHttpAdapter implements HttpAdapterContract { @@ -78,7 +78,7 @@ private function getResponse(string $requestClass): MockResponse return $response; } - public function recorded(callable $callback = null): array + public function recorded(?callable $callback = null): array { if ($callback === null) { return $this->recorded; diff --git a/tests/Http/Requests/DynamicRequestTest.php b/tests/Http/Requests/DynamicRequestTest.php index 700924ed..77c38974 100644 --- a/tests/Http/Requests/DynamicRequestTest.php +++ b/tests/Http/Requests/DynamicRequestTest.php @@ -17,7 +17,8 @@ public function it_throws_exception_for_invalid_resource_class() $this->expectExceptionMessage("The resource class 'NonExistentClass' does not exist."); /** @phpstan-ignore-next-line */ - new class('some-url', 'NonExistentClass') extends DynamicRequest { + new class('some-url', 'NonExistentClass') extends DynamicRequest + { protected static string $method = Method::GET; }; } @@ -25,7 +26,8 @@ public function it_throws_exception_for_invalid_resource_class() /** @test */ public function it_accepts_valid_resource_class() { - $request = new class('some-url', Payment::class) extends DynamicRequest { + $request = new class('some-url', Payment::class) extends DynamicRequest + { protected static string $method = Method::GET; }; @@ -36,7 +38,8 @@ public function it_accepts_valid_resource_class() public function it_resolves_correct_resource_path() { $url = 'https://example.org'; - $request = new class($url, Payment::class) extends DynamicRequest { + $request = new class($url, Payment::class) extends DynamicRequest + { protected static string $method = Method::GET; }; diff --git a/tests/Http/Requests/GetAllMethodsRequestTest.php b/tests/Http/Requests/GetAllMethodsRequestTest.php index be2aeeb7..d4fefdf7 100644 --- a/tests/Http/Requests/GetAllMethodsRequestTest.php +++ b/tests/Http/Requests/GetAllMethodsRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\GetAllMethodsQuery; use Mollie\Api\Http\Requests\GetAllMethodsRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\MethodCollection; @@ -19,7 +18,7 @@ public function it_can_get_all_methods() GetAllMethodsRequest::class => new MockResponse(200, 'method-list'), ]); - $request = new GetAllMethodsRequest(); + $request = new GetAllMethodsRequest; /** @var Response */ $response = $client->send($request); @@ -31,7 +30,7 @@ public function it_can_get_all_methods() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetAllMethodsRequest(); + $request = new GetAllMethodsRequest; $this->assertEquals('methods/all', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetAllPaginatedSubscriptionsRequestTest.php b/tests/Http/Requests/GetAllPaginatedSubscriptionsRequestTest.php index 94cfa4f3..260a365b 100644 --- a/tests/Http/Requests/GetAllPaginatedSubscriptionsRequestTest.php +++ b/tests/Http/Requests/GetAllPaginatedSubscriptionsRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\PaginatedQuery; use Mollie\Api\Http\Requests\GetAllPaginatedSubscriptionsRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\SubscriptionCollection; @@ -19,7 +18,7 @@ public function it_can_get_paginated_subscriptions() GetAllPaginatedSubscriptionsRequest::class => new MockResponse(200, 'subscription-list'), ]); - $request = new GetAllPaginatedSubscriptionsRequest(); + $request = new GetAllPaginatedSubscriptionsRequest; /** @var Response */ $response = $client->send($request); @@ -31,7 +30,7 @@ public function it_can_get_paginated_subscriptions() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetAllPaginatedSubscriptionsRequest(); + $request = new GetAllPaginatedSubscriptionsRequest; $this->assertEquals('subscriptions', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetBalanceReportRequestTest.php b/tests/Http/Requests/GetBalanceReportRequestTest.php index cae89d72..70bf1247 100644 --- a/tests/Http/Requests/GetBalanceReportRequestTest.php +++ b/tests/Http/Requests/GetBalanceReportRequestTest.php @@ -6,7 +6,6 @@ use Mollie\Api\Http\Query\GetBalanceReportQuery; use Mollie\Api\Http\Requests\GetBalanceReportRequest; use Mollie\Api\Http\Response; -use Mollie\Api\Resources\Balance; use Mollie\Api\Resources\BalanceReport; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; diff --git a/tests/Http/Requests/GetClientRequestTest.php b/tests/Http/Requests/GetClientRequestTest.php index bff99d57..1684dddd 100644 --- a/tests/Http/Requests/GetClientRequestTest.php +++ b/tests/Http/Requests/GetClientRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\GetClientQuery; use Mollie\Api\Http\Requests\GetClientRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\Client; diff --git a/tests/Http/Requests/GetEnabledMethodsRequestTest.php b/tests/Http/Requests/GetEnabledMethodsRequestTest.php index 34c77ac6..46dae1dd 100644 --- a/tests/Http/Requests/GetEnabledMethodsRequestTest.php +++ b/tests/Http/Requests/GetEnabledMethodsRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\GetEnabledPaymentMethodsQuery; use Mollie\Api\Http\Requests\GetEnabledMethodsRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\MethodCollection; @@ -19,7 +18,7 @@ public function it_can_get_enabled_methods() GetEnabledMethodsRequest::class => new MockResponse(200, 'method-list'), ]); - $request = new GetEnabledMethodsRequest(); + $request = new GetEnabledMethodsRequest; /** @var Response */ $response = $client->send($request); @@ -31,7 +30,7 @@ public function it_can_get_enabled_methods() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetEnabledMethodsRequest(); + $request = new GetEnabledMethodsRequest; $this->assertEquals('methods', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetOnboardingRequestTest.php b/tests/Http/Requests/GetOnboardingRequestTest.php index aa03c01f..e621f080 100644 --- a/tests/Http/Requests/GetOnboardingRequestTest.php +++ b/tests/Http/Requests/GetOnboardingRequestTest.php @@ -18,7 +18,7 @@ public function it_can_get_onboarding() GetOnboardingRequest::class => new MockResponse(200, 'onboarding'), ]); - $request = new GetOnboardingRequest(); + $request = new GetOnboardingRequest; /** @var Response */ $response = $client->send($request); @@ -30,7 +30,7 @@ public function it_can_get_onboarding() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetOnboardingRequest(); + $request = new GetOnboardingRequest; $this->assertEquals('onboarding/me', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetOrganizationPartnerStatusRequestTest.php b/tests/Http/Requests/GetOrganizationPartnerStatusRequestTest.php index fb4ad513..a2dbde76 100644 --- a/tests/Http/Requests/GetOrganizationPartnerStatusRequestTest.php +++ b/tests/Http/Requests/GetOrganizationPartnerStatusRequestTest.php @@ -4,7 +4,6 @@ use Mollie\Api\Http\Requests\GetOrganizationPartnerStatusRequest; use Mollie\Api\Http\Response; -use Mollie\Api\Resources\Organization; use Mollie\Api\Resources\Partner; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; @@ -19,7 +18,7 @@ public function it_can_get_organization_partner_status() GetOrganizationPartnerStatusRequest::class => new MockResponse(200, 'partner-status'), ]); - $request = new GetOrganizationPartnerStatusRequest(); + $request = new GetOrganizationPartnerStatusRequest; /** @var Response */ $response = $client->send($request); @@ -31,7 +30,7 @@ public function it_can_get_organization_partner_status() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetOrganizationPartnerStatusRequest(); + $request = new GetOrganizationPartnerStatusRequest; $this->assertEquals('organizations/me/partner', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedBalanceRequestTest.php b/tests/Http/Requests/GetPaginatedBalanceRequestTest.php index a65e8915..7fd73bee 100644 --- a/tests/Http/Requests/GetPaginatedBalanceRequestTest.php +++ b/tests/Http/Requests/GetPaginatedBalanceRequestTest.php @@ -18,7 +18,7 @@ public function it_can_get_paginated_balances() GetPaginatedBalanceRequest::class => new MockResponse(200, 'balance-list'), ]); - $request = new GetPaginatedBalanceRequest(); + $request = new GetPaginatedBalanceRequest; /** @var Response */ $response = $client->send($request); @@ -30,7 +30,7 @@ public function it_can_get_paginated_balances() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetPaginatedBalanceRequest(); + $request = new GetPaginatedBalanceRequest; $this->assertEquals('balances', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedBalanceTransactionRequestTest.php b/tests/Http/Requests/GetPaginatedBalanceTransactionRequestTest.php index 0b1aae7b..c7b81b29 100644 --- a/tests/Http/Requests/GetPaginatedBalanceTransactionRequestTest.php +++ b/tests/Http/Requests/GetPaginatedBalanceTransactionRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\PaginatedQuery; use Mollie\Api\Http\Requests\GetPaginatedBalanceTransactionRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\BalanceTransactionCollection; diff --git a/tests/Http/Requests/GetPaginatedChargebacksRequestTest.php b/tests/Http/Requests/GetPaginatedChargebacksRequestTest.php index 001fab9c..3fb26027 100644 --- a/tests/Http/Requests/GetPaginatedChargebacksRequestTest.php +++ b/tests/Http/Requests/GetPaginatedChargebacksRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\PaginatedQuery; use Mollie\Api\Http\Requests\GetPaginatedChargebacksRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\ChargebackCollection; @@ -19,7 +18,7 @@ public function it_can_get_paginated_chargebacks() GetPaginatedChargebacksRequest::class => new MockResponse(200, 'chargeback-list'), ]); - $request = new GetPaginatedChargebacksRequest(); + $request = new GetPaginatedChargebacksRequest; /** @var Response */ $response = $client->send($request); @@ -31,7 +30,7 @@ public function it_can_get_paginated_chargebacks() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetPaginatedChargebacksRequest(); + $request = new GetPaginatedChargebacksRequest; $this->assertEquals('chargebacks', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedClientRequestTest.php b/tests/Http/Requests/GetPaginatedClientRequestTest.php index cce9a83b..6ba60915 100644 --- a/tests/Http/Requests/GetPaginatedClientRequestTest.php +++ b/tests/Http/Requests/GetPaginatedClientRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\PaginatedQuery; use Mollie\Api\Http\Requests\GetPaginatedClientRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\ClientCollection; @@ -19,7 +18,7 @@ public function it_can_get_paginated_clients() GetPaginatedClientRequest::class => new MockResponse(200, 'client-list'), ]); - $request = new GetPaginatedClientRequest(); + $request = new GetPaginatedClientRequest; /** @var Response */ $response = $client->send($request); @@ -31,7 +30,7 @@ public function it_can_get_paginated_clients() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetPaginatedClientRequest(); + $request = new GetPaginatedClientRequest; $this->assertEquals('clients', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedCustomerPaymentsRequestTest.php b/tests/Http/Requests/GetPaginatedCustomerPaymentsRequestTest.php index facbbdd9..4118819b 100644 --- a/tests/Http/Requests/GetPaginatedCustomerPaymentsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedCustomerPaymentsRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\GetPaginatedCustomerPaymentsQuery; use Mollie\Api\Http\Requests\GetPaginatedCustomerPaymentsRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\PaymentCollection; diff --git a/tests/Http/Requests/GetPaginatedCustomerRequestTest.php b/tests/Http/Requests/GetPaginatedCustomerRequestTest.php index 654b58a2..306edf79 100644 --- a/tests/Http/Requests/GetPaginatedCustomerRequestTest.php +++ b/tests/Http/Requests/GetPaginatedCustomerRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\PaginatedQuery; use Mollie\Api\Http\Requests\GetPaginatedCustomerRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\CustomerCollection; @@ -19,7 +18,7 @@ public function it_can_get_paginated_customers() GetPaginatedCustomerRequest::class => new MockResponse(200, 'customer-list'), ]); - $request = new GetPaginatedCustomerRequest(); + $request = new GetPaginatedCustomerRequest; /** @var Response */ $response = $client->send($request); @@ -31,7 +30,7 @@ public function it_can_get_paginated_customers() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetPaginatedCustomerRequest(); + $request = new GetPaginatedCustomerRequest; $this->assertEquals('customers', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedInvoiceRequestTest.php b/tests/Http/Requests/GetPaginatedInvoiceRequestTest.php index 3437ce5d..aa951950 100644 --- a/tests/Http/Requests/GetPaginatedInvoiceRequestTest.php +++ b/tests/Http/Requests/GetPaginatedInvoiceRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\PaginatedQuery; use Mollie\Api\Http\Requests\GetPaginatedInvoiceRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\InvoiceCollection; @@ -19,7 +18,7 @@ public function it_can_get_paginated_invoices() GetPaginatedInvoiceRequest::class => new MockResponse(200, 'invoice-list'), ]); - $request = new GetPaginatedInvoiceRequest(); + $request = new GetPaginatedInvoiceRequest; /** @var Response */ $response = $client->send($request); @@ -31,7 +30,7 @@ public function it_can_get_paginated_invoices() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetPaginatedInvoiceRequest(); + $request = new GetPaginatedInvoiceRequest; $this->assertEquals('invoices', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedPaymentLinkPaymentsRequestTest.php b/tests/Http/Requests/GetPaginatedPaymentLinkPaymentsRequestTest.php index 3514d3d4..3473e1da 100644 --- a/tests/Http/Requests/GetPaginatedPaymentLinkPaymentsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedPaymentLinkPaymentsRequestTest.php @@ -5,9 +5,9 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedPaymentLinkPaymentsRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\PaymentCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; diff --git a/tests/Http/Requests/GetPaginatedPaymentLinksRequestTest.php b/tests/Http/Requests/GetPaginatedPaymentLinksRequestTest.php index ad262369..8a5ff6bb 100644 --- a/tests/Http/Requests/GetPaginatedPaymentLinksRequestTest.php +++ b/tests/Http/Requests/GetPaginatedPaymentLinksRequestTest.php @@ -5,9 +5,9 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedPaymentLinksRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\PaymentLink; use Mollie\Api\Resources\PaymentLinkCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; @@ -71,7 +71,7 @@ public function it_can_iterate_over_payment_links() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetPaginatedPaymentLinksRequest(); + $request = new GetPaginatedPaymentLinksRequest; $this->assertEquals('payment-links', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedPaymentRefundsRequestTest.php b/tests/Http/Requests/GetPaginatedPaymentRefundsRequestTest.php index d5029305..8666739d 100644 --- a/tests/Http/Requests/GetPaginatedPaymentRefundsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedPaymentRefundsRequestTest.php @@ -5,9 +5,9 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedPaymentRefundsRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Refund; use Mollie\Api\Resources\RefundCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; diff --git a/tests/Http/Requests/GetPaginatedPaymentsRequestTest.php b/tests/Http/Requests/GetPaginatedPaymentsRequestTest.php index a3d8171c..35dfcd14 100644 --- a/tests/Http/Requests/GetPaginatedPaymentsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedPaymentsRequestTest.php @@ -71,7 +71,7 @@ public function it_can_iterate_over_payments() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetPaginatedPaymentsRequest(); + $request = new GetPaginatedPaymentsRequest; $this->assertEquals('payments', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedProfilesRequestTest.php b/tests/Http/Requests/GetPaginatedProfilesRequestTest.php index e1dd95db..6551351f 100644 --- a/tests/Http/Requests/GetPaginatedProfilesRequestTest.php +++ b/tests/Http/Requests/GetPaginatedProfilesRequestTest.php @@ -5,9 +5,9 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedProfilesRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Profile; use Mollie\Api\Resources\ProfileCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; @@ -71,7 +71,7 @@ public function it_can_iterate_over_profiles() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetPaginatedProfilesRequest(); + $request = new GetPaginatedProfilesRequest; $this->assertEquals('profiles', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedRefundsRequestTest.php b/tests/Http/Requests/GetPaginatedRefundsRequestTest.php index 42b9f2d5..63ae9abc 100644 --- a/tests/Http/Requests/GetPaginatedRefundsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedRefundsRequestTest.php @@ -5,9 +5,9 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedRefundsRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Refund; use Mollie\Api\Resources\RefundCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; @@ -71,7 +71,7 @@ public function it_can_iterate_over_refunds() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetPaginatedRefundsRequest(); + $request = new GetPaginatedRefundsRequest; $this->assertEquals('refunds', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedSessionsRequestTest.php b/tests/Http/Requests/GetPaginatedSessionsRequestTest.php index 08e577f2..3cb41612 100644 --- a/tests/Http/Requests/GetPaginatedSessionsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedSessionsRequestTest.php @@ -5,9 +5,9 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedSessionsRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Session; use Mollie\Api\Resources\SessionCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; @@ -71,7 +71,7 @@ public function it_can_iterate_over_sessions() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetPaginatedSessionsRequest(); + $request = new GetPaginatedSessionsRequest; $this->assertEquals('sessions', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedSettlementPaymentsRequestTest.php b/tests/Http/Requests/GetPaginatedSettlementPaymentsRequestTest.php index 617fc25b..fa4145a0 100644 --- a/tests/Http/Requests/GetPaginatedSettlementPaymentsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedSettlementPaymentsRequestTest.php @@ -5,9 +5,9 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedSettlementPaymentsRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\PaymentCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; diff --git a/tests/Http/Requests/GetPaginatedSettlementRefundsRequestTest.php b/tests/Http/Requests/GetPaginatedSettlementRefundsRequestTest.php index dd4679b2..d4659701 100644 --- a/tests/Http/Requests/GetPaginatedSettlementRefundsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedSettlementRefundsRequestTest.php @@ -5,9 +5,9 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedSettlementRefundsRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Refund; use Mollie\Api\Resources\RefundCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; diff --git a/tests/Http/Requests/GetPaginatedSettlementsRequestTest.php b/tests/Http/Requests/GetPaginatedSettlementsRequestTest.php index c1950528..09f77251 100644 --- a/tests/Http/Requests/GetPaginatedSettlementsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedSettlementsRequestTest.php @@ -5,9 +5,9 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedSettlementsRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Settlement; use Mollie\Api\Resources\SettlementCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; @@ -71,7 +71,7 @@ public function it_can_iterate_over_settlements() /** @test */ public function it_resolves_correct_resource_path() { - $request = new GetPaginatedSettlementsRequest(); + $request = new GetPaginatedSettlementsRequest; $this->assertEquals('settlements', $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/GetPaginatedSubscriptionPaymentsRequestTest.php b/tests/Http/Requests/GetPaginatedSubscriptionPaymentsRequestTest.php index 6b7d7748..c4f8d683 100644 --- a/tests/Http/Requests/GetPaginatedSubscriptionPaymentsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedSubscriptionPaymentsRequestTest.php @@ -6,9 +6,9 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedSubscriptionPaymentsRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\PaymentCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; diff --git a/tests/Http/Requests/GetPaginatedSubscriptionsRequestTest.php b/tests/Http/Requests/GetPaginatedSubscriptionsRequestTest.php index 4731b471..d96f427e 100644 --- a/tests/Http/Requests/GetPaginatedSubscriptionsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedSubscriptionsRequestTest.php @@ -2,13 +2,12 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\PaginatedQuery; use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedSubscriptionsRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Subscription; use Mollie\Api\Resources\SubscriptionCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; diff --git a/tests/Http/Requests/GetPaginatedTerminalsRequestTest.php b/tests/Http/Requests/GetPaginatedTerminalsRequestTest.php index 19e1fd61..fef5a966 100644 --- a/tests/Http/Requests/GetPaginatedTerminalsRequestTest.php +++ b/tests/Http/Requests/GetPaginatedTerminalsRequestTest.php @@ -5,9 +5,9 @@ use Mollie\Api\Http\Requests\DynamicGetRequest; use Mollie\Api\Http\Requests\GetPaginatedTerminalsRequest; use Mollie\Api\Http\Response; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Terminal; use Mollie\Api\Resources\TerminalCollection; -use Mollie\Api\Resources\LazyCollection; use Tests\Fixtures\MockClient; use Tests\Fixtures\MockResponse; use Tests\Fixtures\SequenceMockResponse; diff --git a/tests/Http/Requests/GetPaymentMethodRequestTest.php b/tests/Http/Requests/GetPaymentMethodRequestTest.php index cc572e90..27bf0e22 100644 --- a/tests/Http/Requests/GetPaymentMethodRequestTest.php +++ b/tests/Http/Requests/GetPaymentMethodRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\GetPaymentMethodQuery; use Mollie\Api\Http\Requests\GetPaymentMethodRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\Method; diff --git a/tests/Http/Requests/GetPaymentRefundRequestTest.php b/tests/Http/Requests/GetPaymentRefundRequestTest.php index a90463e7..0e7778ec 100644 --- a/tests/Http/Requests/GetPaymentRefundRequestTest.php +++ b/tests/Http/Requests/GetPaymentRefundRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\GetPaymentRefundQuery; use Mollie\Api\Http\Requests\GetPaymentRefundRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\Refund; diff --git a/tests/Http/Requests/GetPaymentRequestTest.php b/tests/Http/Requests/GetPaymentRequestTest.php index c1264a67..67239067 100644 --- a/tests/Http/Requests/GetPaymentRequestTest.php +++ b/tests/Http/Requests/GetPaymentRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Query\GetPaymentQuery; use Mollie\Api\Http\Requests\GetPaymentRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\Payment; diff --git a/tests/Http/Requests/UpdatePaymentLinkRequestTest.php b/tests/Http/Requests/UpdatePaymentLinkRequestTest.php index aeb38ba5..8f34ea67 100644 --- a/tests/Http/Requests/UpdatePaymentLinkRequestTest.php +++ b/tests/Http/Requests/UpdatePaymentLinkRequestTest.php @@ -2,7 +2,6 @@ namespace Tests\Http\Requests; -use DateTime; use Mollie\Api\Http\Payload\UpdatePaymentLinkPayload; use Mollie\Api\Http\Requests\UpdatePaymentLinkRequest; use Mollie\Api\Http\Response; diff --git a/tests/Http/Requests/UpdateSessionRequestTest.php b/tests/Http/Requests/UpdateSessionRequestTest.php index cdae6c84..9cc1ddd1 100644 --- a/tests/Http/Requests/UpdateSessionRequestTest.php +++ b/tests/Http/Requests/UpdateSessionRequestTest.php @@ -44,7 +44,7 @@ public function it_can_update_session() public function it_resolves_correct_resource_path() { $sessionId = 'ses_LQNz4v4Qvk'; - $request = new UpdateSessionRequest($sessionId, new AnyPayload()); + $request = new UpdateSessionRequest($sessionId, new AnyPayload); $this->assertEquals("sessions/{$sessionId}", $request->resolveResourcePath()); } diff --git a/tests/Http/Requests/UpdateSubscriptionRequestTest.php b/tests/Http/Requests/UpdateSubscriptionRequestTest.php index cb27e5aa..4612d885 100644 --- a/tests/Http/Requests/UpdateSubscriptionRequestTest.php +++ b/tests/Http/Requests/UpdateSubscriptionRequestTest.php @@ -2,8 +2,8 @@ namespace Tests\Http\Requests; -use Mollie\Api\Http\Payload\UpdateSubscriptionPayload; use Mollie\Api\Http\Payload\Money; +use Mollie\Api\Http\Payload\UpdateSubscriptionPayload; use Mollie\Api\Http\Requests\UpdateSubscriptionRequest; use Mollie\Api\Http\Response; use Mollie\Api\Resources\Subscription;