From f8806abe04e8603b850f379505bb308b76e109e5 Mon Sep 17 00:00:00 2001 From: Daniel Mohns Date: Wed, 30 Oct 2024 16:29:45 +0100 Subject: [PATCH 1/3] Add `abstract` keywords --- src/backend/app/Models/Base/BaseModel.php | 2 +- src/backend/app/Models/Base/BaseModelCore.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/app/Models/Base/BaseModel.php b/src/backend/app/Models/Base/BaseModel.php index f95954b1f..635661df6 100644 --- a/src/backend/app/Models/Base/BaseModel.php +++ b/src/backend/app/Models/Base/BaseModel.php @@ -11,7 +11,7 @@ * logic and define interaction between entities. * "Most" models will extend this base model. */ -class BaseModel extends Model +abstract class BaseModel extends Model { protected $guarded = ['id']; public static $rules = []; diff --git a/src/backend/app/Models/Base/BaseModelCore.php b/src/backend/app/Models/Base/BaseModelCore.php index b1b3f1b3c..6d43ebc05 100644 --- a/src/backend/app/Models/Base/BaseModelCore.php +++ b/src/backend/app/Models/Base/BaseModelCore.php @@ -10,7 +10,7 @@ * Only applies to very few common, high-level configuration entities in * the entire MPM-instance like database and plugin configuration. */ -class BaseModelCore extends Model +abstract class BaseModelCore extends Model { protected $guarded = ['id']; public static $rules = []; From 5e25f7ebc093b9599950fffc79579a6df1d17543 Mon Sep 17 00:00:00 2001 From: Daniel Mohns Date: Wed, 30 Oct 2024 16:31:35 +0100 Subject: [PATCH 2/3] Remove dead code --- src/backend/app/Models/AgentTicket.php | 17 ----------------- src/backend/app/Models/CityCluster.php | 19 ------------------- 2 files changed, 36 deletions(-) delete mode 100644 src/backend/app/Models/AgentTicket.php delete mode 100644 src/backend/app/Models/CityCluster.php diff --git a/src/backend/app/Models/AgentTicket.php b/src/backend/app/Models/AgentTicket.php deleted file mode 100644 index 3dcbdf759..000000000 --- a/src/backend/app/Models/AgentTicket.php +++ /dev/null @@ -1,17 +0,0 @@ -morphOne(Ticket::class, 'original_'); - } -} diff --git a/src/backend/app/Models/CityCluster.php b/src/backend/app/Models/CityCluster.php deleted file mode 100644 index 3ceb1fc18..000000000 --- a/src/backend/app/Models/CityCluster.php +++ /dev/null @@ -1,19 +0,0 @@ -belongsTo(City::class); - } - - public function clusters(): BelongsTo - { - return $this->belongsTo(Cluster::class); - } -} From 3f258f36505635ce8481c5f1b29846efd62c3122 Mon Sep 17 00:00:00 2001 From: Daniel Mohns Date: Wed, 30 Oct 2024 16:30:11 +0100 Subject: [PATCH 3/3] Add missing interface implementation for `Bongo` --- src/backend/app/Sms/Bongo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/app/Sms/Bongo.php b/src/backend/app/Sms/Bongo.php index 571db050e..802d742a0 100644 --- a/src/backend/app/Sms/Bongo.php +++ b/src/backend/app/Sms/Bongo.php @@ -4,6 +4,7 @@ use App\Lib\ISmsProvider; use App\Models\Sms; +use App\Models\SmsAndroidSetting; use GuzzleHttp\Client; use GuzzleHttp\Psr7\Query; use Illuminate\Support\Facades\Log; @@ -85,7 +86,7 @@ public function sendGetSms(string $number, string $body) * * @throws \Exception */ - public function sendSms(string $number, string $body, $callback) + public function sendSms(string $number, string $body, string $callback, ?SmsAndroidSetting $smsAndroidSetting = null) { $httpClient = new Client(); if ($number[0] !== '+') {