chore: code refactor via rector

This commit is contained in:
idevakk
2025-11-14 02:01:01 -08:00
parent 90ab79b3a2
commit ae795880ed
148 changed files with 1520 additions and 1486 deletions

View File

@@ -14,9 +14,9 @@ class Meta extends Model
'value',
];
public function incrementMeta($value = 1)
public function incrementMeta($value = 1): bool
{
$this->value = $this->value + $value;
$this->value += $value;
$this->save();
return true;
@@ -24,7 +24,7 @@ class Meta extends Model
public static function incrementEmailIdsCreated($value = 1): bool
{
$meta = Meta::where('key', 'email_ids_created')->first();
$meta = Meta::query()->where('key', 'email_ids_created')->first();
if ($meta) {
$meta->incrementMeta($value);
@@ -36,7 +36,7 @@ class Meta extends Model
public static function incrementMessagesReceived($value = 1): bool
{
$meta = Meta::where('key', 'messages_received')->first();
$meta = Meta::query()->where('key', 'messages_received')->first();
if ($meta) {
$meta->incrementMeta($value);
@@ -48,7 +48,7 @@ class Meta extends Model
public static function getEmailIdsCreated()
{
$meta = Meta::where('key', 'email_ids_created')->first();
$meta = Meta::query()->where('key', 'email_ids_created')->first();
if ($meta) {
return $meta->value;
}
@@ -58,7 +58,7 @@ class Meta extends Model
public static function getMessagesReceived()
{
$meta = Meta::where('key', 'messages_received')->first();
$meta = Meta::query()->where('key', 'messages_received')->first();
if ($meta) {
return $meta->value;
}