diff --git a/src/Endpoints/BalanceEndpoint.php b/src/Endpoints/BalanceEndpoint.php index ec2bdea4..5f44e41a 100644 --- a/src/Endpoints/BalanceEndpoint.php +++ b/src/Endpoints/BalanceEndpoint.php @@ -2,11 +2,11 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\Resources\Balance; use Mollie\Api\Resources\BalanceCollection; use Mollie\Api\Resources\BaseCollection; +use Mollie\Api\Resources\LazyCollection; class BalanceEndpoint extends CollectionEndpointAbstract { diff --git a/src/Endpoints/BalanceTransactionEndpoint.php b/src/Endpoints/BalanceTransactionEndpoint.php index 4b4c6105..4f244713 100644 --- a/src/Endpoints/BalanceTransactionEndpoint.php +++ b/src/Endpoints/BalanceTransactionEndpoint.php @@ -4,10 +4,10 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Balance; use Mollie\Api\Resources\BalanceTransaction; use Mollie\Api\Resources\BalanceTransactionCollection; +use Mollie\Api\Resources\LazyCollection; class BalanceTransactionEndpoint extends CollectionEndpointAbstract { diff --git a/src/Endpoints/ChargebackEndpoint.php b/src/Endpoints/ChargebackEndpoint.php index 63480ec2..c40c179c 100644 --- a/src/Endpoints/ChargebackEndpoint.php +++ b/src/Endpoints/ChargebackEndpoint.php @@ -2,10 +2,10 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\Resources\Chargeback; use Mollie\Api\Resources\ChargebackCollection; +use Mollie\Api\Resources\LazyCollection; class ChargebackEndpoint extends CollectionEndpointAbstract { diff --git a/src/Endpoints/ClientEndpoint.php b/src/Endpoints/ClientEndpoint.php index ab4cc976..9d7ba66b 100644 --- a/src/Endpoints/ClientEndpoint.php +++ b/src/Endpoints/ClientEndpoint.php @@ -2,10 +2,10 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\Resources\Client; use Mollie\Api\Resources\ClientCollection; +use Mollie\Api\Resources\LazyCollection; class ClientEndpoint extends CollectionEndpointAbstract { diff --git a/src/Endpoints/CollectionEndpointAbstract.php b/src/Endpoints/CollectionEndpointAbstract.php index 6fda8b4a..06b1dec2 100644 --- a/src/Endpoints/CollectionEndpointAbstract.php +++ b/src/Endpoints/CollectionEndpointAbstract.php @@ -2,10 +2,10 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\Resources\BaseCollection; use Mollie\Api\Resources\CursorCollection; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\ResourceFactory; abstract class CollectionEndpointAbstract extends EndpointAbstract diff --git a/src/Endpoints/CustomerEndpoint.php b/src/Endpoints/CustomerEndpoint.php index 4f268451..61c8e689 100644 --- a/src/Endpoints/CustomerEndpoint.php +++ b/src/Endpoints/CustomerEndpoint.php @@ -2,10 +2,10 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\Resources\Customer; use Mollie\Api\Resources\CustomerCollection; +use Mollie\Api\Resources\LazyCollection; class CustomerEndpoint extends CollectionEndpointAbstract { diff --git a/src/Endpoints/CustomerPaymentsEndpoint.php b/src/Endpoints/CustomerPaymentsEndpoint.php index f9e8ab47..1730cb24 100644 --- a/src/Endpoints/CustomerPaymentsEndpoint.php +++ b/src/Endpoints/CustomerPaymentsEndpoint.php @@ -2,8 +2,8 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Customer; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\PaymentCollection; diff --git a/src/Endpoints/InvoiceEndpoint.php b/src/Endpoints/InvoiceEndpoint.php index 66208916..e577abd9 100644 --- a/src/Endpoints/InvoiceEndpoint.php +++ b/src/Endpoints/InvoiceEndpoint.php @@ -2,10 +2,10 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\Resources\Invoice; use Mollie\Api\Resources\InvoiceCollection; +use Mollie\Api\Resources\LazyCollection; class InvoiceEndpoint extends CollectionEndpointAbstract { diff --git a/src/Endpoints/MandateEndpoint.php b/src/Endpoints/MandateEndpoint.php index 9884cd43..d6dee89f 100644 --- a/src/Endpoints/MandateEndpoint.php +++ b/src/Endpoints/MandateEndpoint.php @@ -2,8 +2,8 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Customer; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Mandate; use Mollie\Api\Resources\MandateCollection; diff --git a/src/Endpoints/OrderEndpoint.php b/src/Endpoints/OrderEndpoint.php index df637b4e..91f7bc34 100644 --- a/src/Endpoints/OrderEndpoint.php +++ b/src/Endpoints/OrderEndpoint.php @@ -2,8 +2,8 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Order; use Mollie\Api\Resources\OrderCollection; diff --git a/src/Endpoints/PaymentCaptureEndpoint.php b/src/Endpoints/PaymentCaptureEndpoint.php index 8f2aef61..61b2a6d2 100644 --- a/src/Endpoints/PaymentCaptureEndpoint.php +++ b/src/Endpoints/PaymentCaptureEndpoint.php @@ -2,9 +2,9 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Capture; use Mollie\Api\Resources\CaptureCollection; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Payment; class PaymentCaptureEndpoint extends CollectionEndpointAbstract diff --git a/src/Endpoints/PaymentChargebackEndpoint.php b/src/Endpoints/PaymentChargebackEndpoint.php index 347a62c0..5a232f88 100644 --- a/src/Endpoints/PaymentChargebackEndpoint.php +++ b/src/Endpoints/PaymentChargebackEndpoint.php @@ -2,9 +2,9 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Chargeback; use Mollie\Api\Resources\ChargebackCollection; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Payment; class PaymentChargebackEndpoint extends CollectionEndpointAbstract diff --git a/src/Endpoints/PaymentEndpoint.php b/src/Endpoints/PaymentEndpoint.php index 15080e7e..79b1c6b6 100644 --- a/src/Endpoints/PaymentEndpoint.php +++ b/src/Endpoints/PaymentEndpoint.php @@ -2,8 +2,8 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\PaymentCollection; use Mollie\Api\Resources\Refund; diff --git a/src/Endpoints/PaymentLinkEndpoint.php b/src/Endpoints/PaymentLinkEndpoint.php index 1951040f..f27d09dd 100644 --- a/src/Endpoints/PaymentLinkEndpoint.php +++ b/src/Endpoints/PaymentLinkEndpoint.php @@ -2,8 +2,8 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Payment; use Mollie\Api\Resources\PaymentLink; use Mollie\Api\Resources\PaymentLinkCollection; diff --git a/src/Endpoints/ProfileEndpoint.php b/src/Endpoints/ProfileEndpoint.php index 55bcee2f..d430275c 100644 --- a/src/Endpoints/ProfileEndpoint.php +++ b/src/Endpoints/ProfileEndpoint.php @@ -2,9 +2,9 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; use Mollie\Api\Resources\CurrentProfile; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Profile; use Mollie\Api\Resources\ProfileCollection; diff --git a/src/Endpoints/RefundEndpoint.php b/src/Endpoints/RefundEndpoint.php index 019ae558..de03c477 100644 --- a/src/Endpoints/RefundEndpoint.php +++ b/src/Endpoints/RefundEndpoint.php @@ -2,8 +2,8 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Refund; use Mollie\Api\Resources\RefundCollection; diff --git a/src/Endpoints/SettlementCaptureEndpoint.php b/src/Endpoints/SettlementCaptureEndpoint.php index 7ad672e0..3e51443e 100644 --- a/src/Endpoints/SettlementCaptureEndpoint.php +++ b/src/Endpoints/SettlementCaptureEndpoint.php @@ -4,9 +4,9 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Capture; use Mollie\Api\Resources\CaptureCollection; +use Mollie\Api\Resources\LazyCollection; class SettlementCaptureEndpoint extends CollectionEndpointAbstract { diff --git a/src/Endpoints/SettlementChargebackEndpoint.php b/src/Endpoints/SettlementChargebackEndpoint.php index f8032247..585ccf2c 100644 --- a/src/Endpoints/SettlementChargebackEndpoint.php +++ b/src/Endpoints/SettlementChargebackEndpoint.php @@ -4,9 +4,9 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Chargeback; use Mollie\Api\Resources\ChargebackCollection; +use Mollie\Api\Resources\LazyCollection; class SettlementChargebackEndpoint extends CollectionEndpointAbstract { diff --git a/src/Endpoints/SettlementsEndpoint.php b/src/Endpoints/SettlementsEndpoint.php index da2269c1..76c7cad8 100644 --- a/src/Endpoints/SettlementsEndpoint.php +++ b/src/Endpoints/SettlementsEndpoint.php @@ -2,8 +2,8 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Settlement; use Mollie\Api\Resources\SettlementCollection; diff --git a/src/Endpoints/TerminalEndpoint.php b/src/Endpoints/TerminalEndpoint.php index b30bdb34..4f7a65c6 100644 --- a/src/Endpoints/TerminalEndpoint.php +++ b/src/Endpoints/TerminalEndpoint.php @@ -2,8 +2,8 @@ namespace Mollie\Api\Endpoints; -use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Exceptions\ApiException; +use Mollie\Api\Resources\LazyCollection; use Mollie\Api\Resources\Terminal; use Mollie\Api\Resources\TerminalCollection; diff --git a/src/Resources/CursorCollection.php b/src/Resources/CursorCollection.php index a17f6df3..0f83c7e5 100644 --- a/src/Resources/CursorCollection.php +++ b/src/Resources/CursorCollection.php @@ -37,7 +37,7 @@ abstract protected function createResourceObject(); */ final public function next() { - if (!$this->hasNext()) { + if (! $this->hasNext()) { return null; } @@ -60,7 +60,7 @@ final public function next() */ final public function previous() { - if (!$this->hasPrevious()) { + if (! $this->hasPrevious()) { return null; } @@ -112,7 +112,7 @@ public function getAutoIterator(bool $iterateBackwards = false): LazyCollection yield $item; } - if (($iterateBackwards && !$page->hasPrevious()) || !$page->hasNext()) { + if (($iterateBackwards && ! $page->hasPrevious()) || ! $page->hasNext()) { break; } diff --git a/src/Resources/LazyCollection.php b/src/Resources/LazyCollection.php index 655744ef..f555f086 100644 --- a/src/Resources/LazyCollection.php +++ b/src/Resources/LazyCollection.php @@ -70,7 +70,7 @@ public function first(callable $callback = null): mixed $iterator = $this->getIterator(); if (is_null($callback)) { - if (!$iterator->valid()) { + if (! $iterator->valid()) { return null; } @@ -113,7 +113,7 @@ public function take(int $limit): static $iterator = $this->getIterator(); while ($limit--) { - if (!$iterator->valid()) { + if (! $iterator->valid()) { break; } @@ -131,7 +131,7 @@ public function every(callable $callback): bool $iterator = $this->getIterator(); foreach ($iterator as $key => $value) { - if (!$callback($value, $key)) { + if (! $callback($value, $key)) { return false; } }