diff --git a/src/Endpoints/SettlementCaptureEndpoint.php b/src/Endpoints/SettlementCaptureEndpoint.php index 3e51443ef..553f7499b 100644 --- a/src/Endpoints/SettlementCaptureEndpoint.php +++ b/src/Endpoints/SettlementCaptureEndpoint.php @@ -36,7 +36,7 @@ protected function getResourceCollectionObject($count, $_links) * @return mixed * @throws \Mollie\Api\Exceptions\ApiException */ - public function pageForId(string $settlementId, string $from = null, int $limit = null, array $parameters = []) + public function pageForId(string $settlementId, ?string $from = null, ?int $limit = null, array $parameters = []) { $this->parentId = $settlementId; diff --git a/src/Endpoints/SettlementRefundEndpoint.php b/src/Endpoints/SettlementRefundEndpoint.php index 4f751da79..53d36d79a 100644 --- a/src/Endpoints/SettlementRefundEndpoint.php +++ b/src/Endpoints/SettlementRefundEndpoint.php @@ -39,7 +39,7 @@ protected function getResourceObject() * @return mixed * @throws \Mollie\Api\Exceptions\ApiException */ - public function pageForId(string $settlementId, string $from = null, int $limit = null, array $parameters = []) + public function pageForId(string $settlementId, ?string $from = null, ?int $limit = null, array $parameters = []) { $this->parentId = $settlementId; diff --git a/src/HttpAdapter/Guzzle6And7RetryMiddlewareFactory.php b/src/HttpAdapter/Guzzle6And7RetryMiddlewareFactory.php index b6d8cb73e..a0543e083 100644 --- a/src/HttpAdapter/Guzzle6And7RetryMiddlewareFactory.php +++ b/src/HttpAdapter/Guzzle6And7RetryMiddlewareFactory.php @@ -66,8 +66,8 @@ private function newRetryDecider() return function ( $retries, Request $request, - Response $response = null, - TransferException $exception = null + ?Response $response = null, + ?TransferException $exception = null ) { if ($retries >= static::MAX_RETRIES) { return false; diff --git a/src/Resources/LazyCollection.php b/src/Resources/LazyCollection.php index 0fc90f081..94179a653 100644 --- a/src/Resources/LazyCollection.php +++ b/src/Resources/LazyCollection.php @@ -76,7 +76,7 @@ public function filter(callable $callback): self * @param (callable(TValue, TKey): bool)|null $callback * @return TValue|null */ - public function first(callable $callback = null) + public function first(?callable $callback = null) { $iterator = $this->getIterator(); diff --git a/src/Resources/PaymentLink.php b/src/Resources/PaymentLink.php index bef2c9e30..c37776a58 100644 --- a/src/Resources/PaymentLink.php +++ b/src/Resources/PaymentLink.php @@ -166,7 +166,7 @@ public function archive() * @param array $filters * @return mixed|\Mollie\Api\Resources\BaseCollection */ - public function payments(string $from = null, int $limit = null, array $filters = []) + public function payments(?string $from = null, ?int $limit = null, array $filters = []) { return $this->client->paymentLinkPayments->pageFor( $this, diff --git a/src/Resources/Settlement.php b/src/Resources/Settlement.php index 54f71cd24..d3b77ddeb 100644 --- a/src/Resources/Settlement.php +++ b/src/Resources/Settlement.php @@ -118,7 +118,7 @@ public function isFailed() * @return PaymentCollection * @throws \Mollie\Api\Exceptions\ApiException */ - public function payments(int $limit = null, array $parameters = []): PaymentCollection + public function payments(?int $limit = null, array $parameters = []): PaymentCollection { return $this->client->settlementPayments->pageForId( $this->id, @@ -136,7 +136,7 @@ public function payments(int $limit = null, array $parameters = []): PaymentColl * @return RefundCollection * @throws ApiException */ - public function refunds(int $limit = null, array $parameters = []) + public function refunds(?int $limit = null, array $parameters = []) { return $this->client->settlementRefunds->pageForId( $this->id, @@ -154,7 +154,7 @@ public function refunds(int $limit = null, array $parameters = []) * @return ChargebackCollection * @throws ApiException */ - public function chargebacks(int $limit = null, array $parameters = []) + public function chargebacks(?int $limit = null, array $parameters = []) { return $this->client->settlementChargebacks->pageForId( $this->id, @@ -172,7 +172,7 @@ public function chargebacks(int $limit = null, array $parameters = []) * @return CaptureCollection * @throws ApiException */ - public function captures(int $limit = null, array $parameters = []) + public function captures(?int $limit = null, array $parameters = []) { return $this->client->settlementCaptures->pageForId( $this->id,