From 2ec93609a2ef06575ce01ade9e587ec953a0d0f8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 10 Jul 2025 10:27:07 +1000 Subject: [PATCH] Static analysis --- app/Http/Controllers/ClientPortal/PaymentMethodController.php | 4 ++-- app/Models/Account.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/ClientPortal/PaymentMethodController.php b/app/Http/Controllers/ClientPortal/PaymentMethodController.php index 32ecb139e7..bf6ca821e3 100644 --- a/app/Http/Controllers/ClientPortal/PaymentMethodController.php +++ b/app/Http/Controllers/ClientPortal/PaymentMethodController.php @@ -173,10 +173,10 @@ class PaymentMethodController extends Controller /** @var \App\Models\ClientContact auth()->guard('contact')->user() **/ $client_contact = auth()->guard('contact')->user(); - if (request()->query('method') == GatewayType::CREDIT_CARD) { + if ((string)request()->query('method') === (string)GatewayType::CREDIT_CARD) { return $client_contact->client->getCreditCardGateway(); } - if (request()->query('method') == GatewayType::BACS) { + if ((string)request()->query('method') === (string)GatewayType::BACS) { return $client_contact->client->getBACSGateway(); } diff --git a/app/Models/Account.php b/app/Models/Account.php index d573d6ef4e..7a67967b61 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -643,6 +643,6 @@ class Account extends BaseModel public function canTrial(): bool { - return !$this->is_trial && empty($this->plan) && $this->created_at > time() - (60 * 60 * 24 * 14); + return !$this->is_trial && empty($this->plan) && $this->created_at > time() - (60 * 60 * 24 * 14); //@phpstan-ignore-line } }