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

@@ -43,7 +43,7 @@ public function upload(Request $request): JsonResponse
'screenshots.*' => 'required|image|max:10240', // 최대 10MB
]);
$uploadDir = storage_path('app/tutorial_uploads/' . auth()->id() . '/' . time());
$uploadDir = storage_path('app/tutorial_uploads/'.auth()->id().'/'.time());
if (! is_dir($uploadDir)) {
mkdir($uploadDir, 0755, true);
}
@@ -52,7 +52,7 @@ public function upload(Request $request): JsonResponse
foreach ($request->file('screenshots') as $i => $file) {
$filename = sprintf('screenshot_%02d.%s', $i + 1, $file->getClientOriginalExtension());
$file->move($uploadDir, $filename);
$paths[] = $uploadDir . '/' . $filename;
$paths[] = $uploadDir.'/'.$filename;
}
return response()->json([
@@ -79,7 +79,7 @@ public function analyze(Request $request): JsonResponse
if (! file_exists($path)) {
return response()->json([
'success' => false,
'message' => '업로드된 파일을 찾을 수 없습니다: ' . basename($path),
'message' => '업로드된 파일을 찾을 수 없습니다: '.basename($path),
], 400);
}
}
@@ -93,7 +93,7 @@ public function analyze(Request $request): JsonResponse
return response()->json([
'success' => false,
'message' => 'AI 분석 중 오류가 발생했습니다: ' . $e->getMessage(),
'message' => 'AI 분석 중 오류가 발생했습니다: '.$e->getMessage(),
], 500);
}
@@ -188,7 +188,7 @@ public function download(int $id): BinaryFileResponse|RedirectResponse|JsonRespo
return response()->json(['message' => '영상 파일을 찾을 수 없습니다.'], 404);
}
$filename = 'tutorial_' . ($tutorial->title ? preg_replace('/[^a-zA-Z0-9가-힣_\-.]/', '_', $tutorial->title) : $tutorial->id) . '.mp4';
$filename = 'tutorial_'.($tutorial->title ? preg_replace('/[^a-zA-Z0-9가-힣_\-.]/', '_', $tutorial->title) : $tutorial->id).'.mp4';
return response()->download($tutorial->output_path, $filename, [
'Content-Type' => 'video/mp4',

View File

@@ -355,12 +355,12 @@ private function buildYoutubeText(VideoGeneration $video, array $scenario, array
// 해시태그 생성
$hashtags = ['#shorts', '#쇼츠'];
if ($keyword) {
$hashtags[] = '#' . str_replace(' ', '', $keyword);
$hashtags[] = '#'.str_replace(' ', '', $keyword);
}
// 시나리오에서 추가 태그 추출
$bgmMood = $scenario['bgm_mood'] ?? '';
if ($bgmMood) {
$hashtags[] = '#' . $bgmMood;
$hashtags[] = '#'.$bgmMood;
}
$hashtags = array_merge($hashtags, ['#건강', '#건강정보', '#헬스']);
@@ -373,7 +373,7 @@ private function buildYoutubeText(VideoGeneration $video, array $scenario, array
foreach ($scenes as $scene) {
$narration = $scene['narration'] ?? '';
if ($narration && ($scene['scene_type'] ?? '') !== 'HOOK') {
$descLines[] = '- ' . mb_substr($narration, 0, 60);
$descLines[] = '- '.mb_substr($narration, 0, 60);
}
}