style: Pint 코드 스타일 자동 수정 및 마이그레이션 실행
- Pint 스타일 이슈 25개 수정 (783 파일 통과) - 마이그레이션 4개 실행 (payrolls, payroll_settings, push 테이블) - routes/api.php import 정렬
This commit is contained in:
@@ -69,6 +69,7 @@ protected function shouldSkip(Request $request): bool
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -124,6 +125,7 @@ protected function maskSensitiveHeaders(array $headers): array
|
||||
$headers[$header] = ['***MASKED***'];
|
||||
}
|
||||
}
|
||||
|
||||
return $headers;
|
||||
}
|
||||
|
||||
@@ -136,6 +138,7 @@ protected function maskSensitiveFields(array $data): array
|
||||
$data[$key] = $this->maskSensitiveFields($value);
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -148,7 +151,7 @@ protected function truncateResponse(?string $content): ?string
|
||||
// 10KB 이상이면 잘라내기
|
||||
$maxLength = 10 * 1024;
|
||||
if (strlen($content) > $maxLength) {
|
||||
return substr($content, 0, $maxLength) . '...[TRUNCATED]';
|
||||
return substr($content, 0, $maxLength).'...[TRUNCATED]';
|
||||
}
|
||||
|
||||
return $content;
|
||||
@@ -157,7 +160,7 @@ protected function truncateResponse(?string $content): ?string
|
||||
protected function writeToLogFile(array $logData): void
|
||||
{
|
||||
$logMessage = sprintf(
|
||||
"[%s] %s %s | Status: %d | Duration: %dms | IP: %s | User: %s",
|
||||
'[%s] %s %s | Status: %d | Duration: %dms | IP: %s | User: %s',
|
||||
now()->format('Y-m-d H:i:s'),
|
||||
$logData['method'],
|
||||
$logData['url'],
|
||||
@@ -188,13 +191,14 @@ protected function getOrCreateGroupId(?int $tenantId, ?int $userId): string
|
||||
if ($existingGroupId) {
|
||||
// TTL 갱신 (연속 요청 시 그룹 유지)
|
||||
cache()->put($cacheKey, $existingGroupId, $groupTtl);
|
||||
|
||||
return $existingGroupId;
|
||||
}
|
||||
|
||||
// 새 그룹 ID 생성
|
||||
$newGroupId = now()->format('Ymd_His_') . substr(md5(uniqid((string) mt_rand(), true)), 0, 8);
|
||||
$newGroupId = now()->format('Ymd_His_').substr(md5(uniqid((string) mt_rand(), true)), 0, 8);
|
||||
cache()->put($cacheKey, $newGroupId, $groupTtl);
|
||||
|
||||
return $newGroupId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user