From 6c2d918d7836c46c2ae40ecfc9c6d3d759f0e730 Mon Sep 17 00:00:00 2001 From: Younes el Barnoussi Date: Mon, 6 May 2024 22:40:57 +0200 Subject: [PATCH] fix: :bug: add optional chaining --- src/Mollie/UpdateMolliePayment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mollie/UpdateMolliePayment.php b/src/Mollie/UpdateMolliePayment.php index a4eb9a1..4bf6c39 100644 --- a/src/Mollie/UpdateMolliePayment.php +++ b/src/Mollie/UpdateMolliePayment.php @@ -13,8 +13,8 @@ class UpdateMolliePayment extends BaseMollieInteraction implements Contract public function execute(Payment $dirtyPayment, ?ProvidesOauthInformation $model = null): Payment { $this->setAccessToken($model); - - if ($model->isMollieTestmode()) { + + if ($model?->isMollieTestmode()) { $dirtyPayment->mode = 'test'; }