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

@@ -87,7 +87,7 @@ protected static function boot()
*/
public static function generateInquiryKey(): string
{
return date('Ymd') . Str::upper(Str::random(24));
return date('Ymd').Str::upper(Str::random(24));
}
/**
@@ -126,8 +126,9 @@ public function getFormattedCompanyKeyAttribute(): string
{
$key = $this->company_key;
if (strlen($key) === 10) {
return substr($key, 0, 3) . '-' . substr($key, 3, 2) . '-' . substr($key, 5);
return substr($key, 0, 3).'-'.substr($key, 3, 2).'-'.substr($key, 5);
}
return $key;
}
@@ -172,11 +173,11 @@ public function getNtsStatusLabelAttribute(): string
/**
* API 응답으로부터 모델 생성
*
* @param string $companyKey 사업자번호
* @param array $apiResult 쿠콘 API 결과
* @param array|null $ntsResult 국세청 API 결과
* @param int|null $userId 조회자 ID
* @param int|null $tenantId 테넌트 ID
* @param string $companyKey 사업자번호
* @param array $apiResult 쿠콘 API 결과
* @param array|null $ntsResult 국세청 API 결과
* @param int|null $userId 조회자 ID
* @param int|null $tenantId 테넌트 ID
*/
public static function createFromApiResponse(
string $companyKey,
@@ -199,10 +200,10 @@ public static function createFromApiResponse(
$businessType = $companyInfoData['bizcnd'] ?? $companyInfoData['indutyNm'] ?? null;
$businessItem = $companyInfoData['bizitm'] ?? $companyInfoData['indutyDetailNm'] ?? null;
$establishmentDate = null;
if (!empty($companyInfoData['estbDt']) || !empty($companyInfoData['estbDate'])) {
if (! empty($companyInfoData['estbDt']) || ! empty($companyInfoData['estbDate'])) {
$estbDt = $companyInfoData['estbDt'] ?? $companyInfoData['estbDate'];
if (strlen($estbDt) === 8) {
$establishmentDate = substr($estbDt, 0, 4) . '-' . substr($estbDt, 4, 2) . '-' . substr($estbDt, 6, 2);
$establishmentDate = substr($estbDt, 0, 4).'-'.substr($estbDt, 4, 2).'-'.substr($estbDt, 6, 2);
}
}
@@ -216,8 +217,8 @@ public static function createFromApiResponse(
$ntsStatus = $ntsData['b_stt'] ?? null;
$ntsStatusCode = $ntsData['b_stt_cd'] ?? null;
$ntsTaxType = $ntsData['tax_type'] ?? null;
if (!empty($ntsData['end_dt']) && strlen($ntsData['end_dt']) === 8) {
$ntsClosureDate = substr($ntsData['end_dt'], 0, 4) . '-' . substr($ntsData['end_dt'], 4, 2) . '-' . substr($ntsData['end_dt'], 6, 2);
if (! empty($ntsData['end_dt']) && strlen($ntsData['end_dt']) === 8) {
$ntsClosureDate = substr($ntsData['end_dt'], 0, 4).'-'.substr($ntsData['end_dt'], 4, 2).'-'.substr($ntsData['end_dt'], 6, 2);
}
}
@@ -230,7 +231,7 @@ public static function createFromApiResponse(
if (isset($apiResult[$key]['success']) && $apiResult[$key]['success']) {
$successCount++;
} else {
$errors[] = $key . ': ' . ($apiResult[$key]['error'] ?? 'Unknown error');
$errors[] = $key.': '.($apiResult[$key]['error'] ?? 'Unknown error');
}
}