Static analysis

This commit is contained in:
David Bomba 2025-07-10 10:27:07 +10:00
parent 9b97ba7fae
commit 2ec93609a2
2 changed files with 3 additions and 3 deletions

View File

@ -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();
}

View File

@ -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
}
}