From d2fbf34bebcb14fd26f2dbe328f091642e0fabfc Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 15 Aug 2023 22:47:54 +1000 Subject: [PATCH] Fixes for static analysis --- app/Models/PaymentHash.php | 2 +- app/PaymentDrivers/CheckoutCom/CheckoutWebhook.php | 4 ++-- config/beacon.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Models/PaymentHash.php b/app/Models/PaymentHash.php index 9905feddab..233cb2d367 100644 --- a/app/Models/PaymentHash.php +++ b/app/Models/PaymentHash.php @@ -40,7 +40,7 @@ class PaymentHash extends Model /** - * @return array + * @return mixed */ public function invoices() { diff --git a/app/PaymentDrivers/CheckoutCom/CheckoutWebhook.php b/app/PaymentDrivers/CheckoutCom/CheckoutWebhook.php index fcac5acdc3..5b9b515999 100644 --- a/app/PaymentDrivers/CheckoutCom/CheckoutWebhook.php +++ b/app/PaymentDrivers/CheckoutCom/CheckoutWebhook.php @@ -69,7 +69,7 @@ class CheckoutWebhook implements ShouldQueue { $payment_object = $this->webhook_array['data']; - $payment = Payment::withTrashed()->where('transaction_reference', $payment_object['id'])->first(); + $payment = Payment::query()->withTrashed()->where('transaction_reference', $payment_object['id'])->first(); if($payment && $payment->status_id == Payment::STATUS_COMPLETED) return; @@ -84,7 +84,7 @@ class CheckoutWebhook implements ShouldQueue $metadata = $this->webhook_array['metadata']; - $payment_hash = PaymentHash::where('hash', $metadata['udf2'])->first(); + $payment_hash = PaymentHash::query()->where('hash', $metadata['udf2'])->first(); $driver = $this->company_gateway->driver($payment_hash->fee_invoice->client)->init()->setPaymentMethod(); diff --git a/config/beacon.php b/config/beacon.php index 06006106b2..8fff666a81 100644 --- a/config/beacon.php +++ b/config/beacon.php @@ -22,8 +22,8 @@ return [ */ 'batch' => true, - // 'cache_connection' => 'sentinel-cache', - 'cache_connection' => 'cache', + 'cache_connection' => 'sentinel-cache', + // 'cache_connection' => 'cache', /* * The default key used to store * metrics for batching