style: Pint 포맷팅 적용

This commit is contained in:
김보곤
2026-02-25 11:45:01 +09:00
parent 68b1622a4e
commit 9a7c548246
199 changed files with 1420 additions and 1083 deletions

View File

@@ -114,7 +114,7 @@ public function uploadAudio(Request $request, GoogleCloudStorageService $gcs): J
// 파일 저장
$file = $request->file('audio');
$fileName = 'audio_' . now()->format('Ymd_His') . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$fileName = 'audio_'.now()->format('Ymd_His').'_'.uniqid().'.'.$file->getClientOriginalExtension();
$localPath = $file->storeAs("tenant/consultations/{$tenantId}", $fileName, 'local');
$fileSize = $file->getSize();
@@ -154,7 +154,7 @@ public function uploadAudio(Request $request, GoogleCloudStorageService $gcs): J
'formatted_duration' => $consultation->formatted_duration,
'created_by_name' => $consultation->creator->name,
'created_at' => $consultation->created_at->format('Y-m-d H:i'),
'has_gcs' => !empty($gcsUri),
'has_gcs' => ! empty($gcsUri),
],
]);
}
@@ -178,7 +178,7 @@ public function uploadFile(Request $request): JsonResponse
// 파일 저장
$file = $request->file('file');
$originalName = $file->getClientOriginalName();
$fileName = now()->format('Ymd_His') . '_' . uniqid() . '_' . $originalName;
$fileName = now()->format('Ymd_His').'_'.uniqid().'_'.$originalName;
$path = $file->storeAs("tenant/attachments/{$tenantId}", $fileName, 'local');
// DB에 저장
@@ -229,7 +229,7 @@ public function downloadAudio(int $consultationId, GoogleCloudStorageService $gc
// GCS에 저장된 경우 서명된 URL로 리다이렉트
if ($consultation->gcs_uri) {
$objectName = str_replace('gs://' . $gcs->getBucketName() . '/', '', $consultation->gcs_uri);
$objectName = str_replace('gs://'.$gcs->getBucketName().'/', '', $consultation->gcs_uri);
$signedUrl = $gcs->getSignedUrl($objectName, 60);
if ($signedUrl) {
@@ -240,7 +240,7 @@ public function downloadAudio(int $consultationId, GoogleCloudStorageService $gc
// 로컬 파일 다운로드
$localPath = Storage::disk('local')->path($consultation->file_path);
if (!file_exists($localPath)) {
if (! file_exists($localPath)) {
abort(404, '파일을 찾을 수 없습니다.');
}
@@ -250,11 +250,11 @@ public function downloadAudio(int $consultationId, GoogleCloudStorageService $gc
'wav' => 'audio/wav',
'mp3' => 'audio/mpeg',
'ogg' => 'audio/ogg',
'm4a' => 'audio/mp4'
'm4a' => 'audio/mp4',
];
$contentType = $mimeTypes[$extension] ?? 'audio/webm';
$downloadFileName = '상담녹음_' . $consultation->created_at->format('Ymd_His') . '.' . $extension;
$downloadFileName = '상담녹음_'.$consultation->created_at->format('Ymd_His').'.'.$extension;
return response()->download($localPath, $downloadFileName, [
'Content-Type' => $contentType,
@@ -274,7 +274,7 @@ public function downloadFile(int $consultationId): BinaryFileResponse
$localPath = Storage::disk('local')->path($consultation->file_path);
if (!file_exists($localPath)) {
if (! file_exists($localPath)) {
abort(404, '파일을 찾을 수 없습니다.');
}
@@ -359,7 +359,7 @@ public function prospectUploadAudio(Request $request, GoogleCloudStorageService
$duration = $request->input('duration');
$file = $request->file('audio');
$fileName = 'audio_' . now()->format('Ymd_His') . '_' . uniqid() . '.' . $file->getClientOriginalExtension();
$fileName = 'audio_'.now()->format('Ymd_His').'_'.uniqid().'.'.$file->getClientOriginalExtension();
$localPath = $file->storeAs("prospect/consultations/{$prospectId}", $fileName, 'local');
$fileSize = $file->getSize();
@@ -397,7 +397,7 @@ public function prospectUploadAudio(Request $request, GoogleCloudStorageService
'formatted_duration' => $consultation->formatted_duration,
'created_by_name' => $consultation->creator->name,
'created_at' => $consultation->created_at->format('Y-m-d H:i'),
'has_gcs' => !empty($gcsUri),
'has_gcs' => ! empty($gcsUri),
],
]);
}
@@ -420,7 +420,7 @@ public function prospectUploadFile(Request $request): JsonResponse
$file = $request->file('file');
$originalName = $file->getClientOriginalName();
$fileName = now()->format('Ymd_His') . '_' . uniqid() . '_' . $originalName;
$fileName = now()->format('Ymd_His').'_'.uniqid().'_'.$originalName;
$path = $file->storeAs("prospect/attachments/{$prospectId}", $fileName, 'local');
$consultation = SalesConsultation::createFileByProspect(