Fix Pint formatting
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\BaseModel;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Services\SemesterRangeService;
|
||||
|
||||
class Configuration extends BaseModel
|
||||
{
|
||||
@@ -58,11 +57,11 @@ class Configuration extends BaseModel
|
||||
}
|
||||
|
||||
$row = static::query()->create([
|
||||
'config_key' => $key,
|
||||
'config_key' => $key,
|
||||
'config_value' => $value,
|
||||
]);
|
||||
|
||||
return !empty($row->id);
|
||||
return ! empty($row->id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,6 +86,7 @@ class Configuration extends BaseModel
|
||||
public static function addConfig(array $data): int
|
||||
{
|
||||
$row = static::query()->create($data);
|
||||
|
||||
return (int) $row->id;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ class Configuration extends BaseModel
|
||||
try {
|
||||
// If you have this service in Laravel, inject/resolve it from container.
|
||||
// This call assumes the service constructor can accept Configuration model (like legacy did).
|
||||
$semester = app(\App\Services\SemesterRangeService::class)->getSemesterForDate();
|
||||
$semester = app(SemesterRangeService::class)->getSemesterForDate();
|
||||
if (is_string($semester) && $semester !== '') {
|
||||
return $semester;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user