From 01b313f5ea8aaf6db5b94f37c4c857ec8cb02d5e Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Fri, 27 Oct 2023 10:16:46 +0200 Subject: [PATCH] fix example --- examples/pagination/backwards.php | 8 ++++---- examples/pagination/basic_usage.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/pagination/backwards.php b/examples/pagination/backwards.php index 5eeb6b53..d14823dc 100644 --- a/examples/pagination/backwards.php +++ b/examples/pagination/backwards.php @@ -37,11 +37,11 @@ $orderId = 'ord_8wmqcHMN4U'; // cursor paginating backwards through all orders - $page = $client->orders->page($orderId); + $page = $mollie->orders->page($orderId); while ($page->hasPrevious()) { foreach ($page as $order) { - echo($order->id); + echo ($order->id); } $page = $page->previous(); @@ -49,8 +49,8 @@ // iterating backwards using the iterator by passing iterateBackwards = true // in php 8.0+ you could also use the named parameter syntax iterator(iterateBackwards: true) - foreach ($client->orders->iterator(null, null, [], true) as $order) { - echo($order->id); + foreach ($mollie->orders->iterator(null, null, [], true) as $order) { + echo ($order->id); } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); diff --git a/examples/pagination/basic_usage.php b/examples/pagination/basic_usage.php index 38f4d53f..658da245 100644 --- a/examples/pagination/basic_usage.php +++ b/examples/pagination/basic_usage.php @@ -36,11 +36,11 @@ // cursor paginating through all orders - $page = $client->orders->page(); + $page = $mollie->orders->page(); while ($page->hasNext()) { foreach ($page as $order) { - echo($order->id); + echo ($order->id); } $page = $page->next(); @@ -48,8 +48,8 @@ // using the iterator we can iterate over all orders directly - foreach ($client->orders->iterator() as $order) { - echo($order->id); + foreach ($mollie->orders->iterator() as $order) { + echo ($order->id); } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage());