style: Laravel Pint 코드 포맷팅 적용

- PSR-12 스타일 가이드 준수
- 302개 파일 스타일 이슈 자동 수정
- 코드 로직 변경 없음 (포맷팅만)
This commit is contained in:
2025-11-06 17:45:49 +09:00
parent 48e76432ee
commit cc206fdbed
294 changed files with 4476 additions and 2561 deletions

View File

@@ -2,8 +2,8 @@
namespace App\Services;
use Illuminate\Support\Carbon;
use App\Models\Commons\CategoryLog;
use Illuminate\Support\Carbon;
class CategoryLogService extends Service
{
@@ -11,19 +11,25 @@ public function index(int $categoryId, array $params)
{
$tenantId = $this->tenantId();
$size = (int)($params['size'] ?? 20);
$size = (int) ($params['size'] ?? 20);
$action = $params['action'] ?? null; // insert|update|delete
$from = $params['from'] ?? null; // Y-m-d
$to = $params['to'] ?? null;
$from = $params['from'] ?? null; // Y-m-d
$to = $params['to'] ?? null;
$q = CategoryLog::query()
->where('tenant_id', $tenantId)
->where('category_id', $categoryId)
->orderByDesc('changed_at');
if ($action) $q->where('action', $action);
if ($from) $q->whereDate('changed_at', '>=', Carbon::parse($from)->toDateString());
if ($to) $q->whereDate('changed_at', '<=', Carbon::parse($to)->toDateString());
if ($action) {
$q->where('action', $action);
}
if ($from) {
$q->whereDate('changed_at', '>=', Carbon::parse($from)->toDateString());
}
if ($to) {
$q->whereDate('changed_at', '<=', Carbon::parse($to)->toDateString());
}
return $q->paginate($size);
}
@@ -36,7 +42,10 @@ public function show(int $logId)
->where('tenant_id', $tenantId)
->find($logId);
if (!$log) throw new BadRequestHttpException(__('error.not_found'));
if (! $log) {
throw new BadRequestHttpException(__('error.not_found'));
}
return $log;
}
}