chore: code refactor via rector
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user