Skip to content

Commit

Permalink
Merge branch 'master' into php-8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sandervanhooft committed Dec 9, 2024
2 parents a08a86b + be19491 commit 411e2a8
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/Endpoints/PaymentLinkPaymentEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ protected function getResourceObject()
return new Payment($this->client);
}

public function pageForId(string $paymentLinkId, string $from = null, int $limit = null, array $filters = [])
public function pageForId(string $paymentLinkId, ?string $from = null, ?int $limit = null, array $filters = [])
{
$this->parentId = $paymentLinkId;

return $this->rest_list($from, $limit, $filters);
}

public function pageFor(PaymentLink $paymentLink, string $from = null, int $limit = null, array $filters = [])
public function pageFor(PaymentLink $paymentLink, ?string $from = null, ?int $limit = null, array $filters = [])
{
return $this->pageForId($paymentLink->id, $from, $limit, $filters);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/SettlementCaptureEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/SettlementChargebackEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,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;

Expand Down
2 changes: 1 addition & 1 deletion src/Endpoints/SettlementRefundEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/HttpAdapter/Guzzle6And7RetryMiddlewareFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/LazyCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/PaymentLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions src/Resources/Settlement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 411e2a8

Please sign in to comment.