chore: code styling via pint

This commit is contained in:
idevakk
2025-11-14 01:51:35 -08:00
parent 3892c48ef2
commit 90ab79b3a2
121 changed files with 1003 additions and 892 deletions

View File

@@ -5,7 +5,8 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Meta extends Model {
class Meta extends Model
{
use HasFactory;
protected $fillable = [
@@ -13,9 +14,11 @@ class Meta extends Model {
'value',
];
public function incrementMeta($value = 1) {
public function incrementMeta($value = 1)
{
$this->value = $this->value + $value;
$this->save();
return true;
}
@@ -24,8 +27,10 @@ class Meta extends Model {
$meta = Meta::where('key', 'email_ids_created')->first();
if ($meta) {
$meta->incrementMeta($value);
return true;
}
return false;
}
@@ -34,24 +39,30 @@ class Meta extends Model {
$meta = Meta::where('key', 'messages_received')->first();
if ($meta) {
$meta->incrementMeta($value);
return true;
}
return false;
}
public static function getEmailIdsCreated() {
public static function getEmailIdsCreated()
{
$meta = Meta::where('key', 'email_ids_created')->first();
if ($meta) {
return $meta->value;
}
return "NaN";
return 'NaN';
}
public static function getMessagesReceived() {
public static function getMessagesReceived()
{
$meta = Meta::where('key', 'messages_received')->first();
if ($meta) {
return $meta->value;
}
return "NaN";
return 'NaN';
}
}