From cffe266d9631e6194c8b612ae61a2bd5b3b5da51 Mon Sep 17 00:00:00 2001 From: Sergiy Osipchuk Date: Tue, 21 Mar 2023 10:37:33 +0200 Subject: [PATCH] add null type hints --- src/Action/StatusSessionAction.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Action/StatusSessionAction.php b/src/Action/StatusSessionAction.php index a0afd0e..4f9ad2d 100644 --- a/src/Action/StatusSessionAction.php +++ b/src/Action/StatusSessionAction.php @@ -31,7 +31,7 @@ public function isMarkedStatus(GetStatusInterface $request, ArrayObject $model): return true; } - if ($this->isExpiredStatus($status, $paymentStatus)) { + if ($this->isExpiredStatus($status)) { $request->markExpired(); return true; @@ -61,7 +61,7 @@ public function isMarkedStatus(GetStatusInterface $request, ArrayObject $model): return false; } - protected function isCaptureStatus(string $status, string $paymentStatus): bool + protected function isCaptureStatus(string $status, string|null $paymentStatus): bool { if (Session::STATUS_COMPLETE !== $status) { return false; @@ -70,7 +70,7 @@ protected function isCaptureStatus(string $status, string $paymentStatus): bool return Session::PAYMENT_STATUS_UNPAID !== $paymentStatus; } - protected function isExpiredStatus(string $status, string $paymentStatus): bool + protected function isExpiredStatus(string $status): bool { return Session::STATUS_EXPIRED === $status; } @@ -128,7 +128,7 @@ protected function retrievePaymentIntentRelatedToASubscription(string $subscript return $paymentIntent; } - protected function isPendingStatus(string $status, string $paymentStatus): bool + protected function isPendingStatus(string $status, string|null $paymentStatus): bool { if (Session::STATUS_COMPLETE !== $status) { return false; @@ -137,7 +137,7 @@ protected function isPendingStatus(string $status, string $paymentStatus): bool return Session::PAYMENT_STATUS_UNPAID === $paymentStatus; } - protected function isNewStatus(string $status, string $paymentStatus): bool + protected function isNewStatus(string $status, string|null $paymentStatus): bool { if (Session::STATUS_OPEN !== $status) { return false;