style: Laravel Pint 코드 포맷팅 적용
- PSR-12 스타일 가이드 준수 - 302개 파일 스타일 이슈 자동 수정 - 코드 로직 변경 없음 (포맷팅만)
This commit is contained in:
@@ -14,16 +14,16 @@ public function authorize(): bool
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'page' => 'nullable|integer|min:1',
|
||||
'size' => 'nullable|integer|min:1|max:200',
|
||||
'page' => 'nullable|integer|min:1',
|
||||
'size' => 'nullable|integer|min:1|max:200',
|
||||
'target_type' => 'nullable|string|max:100',
|
||||
'target_id' => 'nullable|integer|min:1',
|
||||
'action' => 'nullable|string|max:50',
|
||||
'actor_id' => 'nullable|integer|min:1',
|
||||
'from' => 'nullable|date',
|
||||
'to' => 'nullable|date|after_or_equal:from',
|
||||
'sort' => 'nullable|string|in:created_at',
|
||||
'order' => 'nullable|string|in:asc,desc',
|
||||
'target_id' => 'nullable|integer|min:1',
|
||||
'action' => 'nullable|string|max:50',
|
||||
'actor_id' => 'nullable|integer|min:1',
|
||||
'from' => 'nullable|date',
|
||||
'to' => 'nullable|date|after_or_equal:from',
|
||||
'sort' => 'nullable|string|in:created_at',
|
||||
'order' => 'nullable|string|in:asc,desc',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Common;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class PaginateRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'page' => 'nullable|integer|min:1',
|
||||
'size' => 'nullable|integer|min:1|max:100',
|
||||
'q' => 'nullable|string|max:100',
|
||||
'sort' => 'nullable|string|in:id,code,name,created_at',
|
||||
'page' => 'nullable|integer|min:1',
|
||||
'size' => 'nullable|integer|min:1|max:100',
|
||||
'q' => 'nullable|string|max:100',
|
||||
'sort' => 'nullable|string|in:id,code,name,created_at',
|
||||
'order' => 'nullable|string|in:asc,desc',
|
||||
];
|
||||
}
|
||||
@@ -21,9 +25,10 @@ public function rules(): array
|
||||
public function validatedOrDefaults(): array
|
||||
{
|
||||
$v = $this->validated();
|
||||
$v['page'] = $v['page'] ?? 1;
|
||||
$v['size'] = $v['size'] ?? 20;
|
||||
$v['page'] = $v['page'] ?? 1;
|
||||
$v['size'] = $v['size'] ?? 20;
|
||||
$v['order'] = $v['order'] ?? 'desc';
|
||||
|
||||
return $v;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@ public function rules(): array
|
||||
{
|
||||
return [
|
||||
'target_version_id' => 'nullable|integer|min:1',
|
||||
'name' => 'nullable|string|max:100',
|
||||
'is_primary' => 'nullable|boolean',
|
||||
'notes' => 'nullable|string',
|
||||
'name' => 'nullable|string|max:100',
|
||||
'is_primary' => 'nullable|boolean',
|
||||
'notes' => 'nullable|string',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ public function messages(): array
|
||||
{
|
||||
return [
|
||||
'other_template_id.required' => __('validation.required', ['attribute' => 'other_template_id']),
|
||||
'other_template_id.integer' => __('validation.integer', ['attribute' => 'other_template_id']),
|
||||
'other_template_id.min' => __('validation.min.numeric', ['attribute' => 'other_template_id', 'min' => 1]),
|
||||
'other_template_id.integer' => __('validation.integer', ['attribute' => 'other_template_id']),
|
||||
'other_template_id.min' => __('validation.min.numeric', ['attribute' => 'other_template_id', 'min' => 1]),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Design\BomTemplate;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use App\Support\Validation\BomItemRules;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ReplaceItemsRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
$itemRules = collect(BomItemRules::base())
|
||||
->mapWithKeys(fn($rule, $key) => ["items.*.$key" => $rule])
|
||||
->mapWithKeys(fn ($rule, $key) => ["items.*.$key" => $rule])
|
||||
->all();
|
||||
|
||||
return ['items' => 'required|array|min:1'] + $itemRules;
|
||||
@@ -21,8 +25,8 @@ public function messages(): array
|
||||
{
|
||||
return [
|
||||
'items.required' => __('validation.required', ['attribute' => 'items']),
|
||||
'items.array' => __('validation.array', ['attribute' => 'items']),
|
||||
'items.min' => __('validation.min.array', ['attribute' => 'items', 'min' => 1]),
|
||||
'items.array' => __('validation.array', ['attribute' => 'items']),
|
||||
'items.min' => __('validation.min.array', ['attribute' => 'items', 'min' => 1]),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public function rules(): array
|
||||
'parameters.power_source' => 'nullable|string|in:manual,electric,automatic',
|
||||
'parameters.motor_type' => 'nullable|string|in:standard,low_noise,high_torque',
|
||||
'parameters.material_grade' => 'nullable|string|in:standard,premium,luxury',
|
||||
'company_name' => 'nullable|string|max:100'
|
||||
'company_name' => 'nullable|string|max:100',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public function messages(): array
|
||||
'parameters.material_grade.string' => __('error.validation.string'),
|
||||
'parameters.material_grade.in' => __('error.validation.in'),
|
||||
'company_name.string' => __('error.validation.string'),
|
||||
'company_name.max' => __('error.validation.max.string')
|
||||
'company_name.max' => __('error.validation.max.string'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public function attributes(): array
|
||||
'parameters.power_source' => '동력원',
|
||||
'parameters.motor_type' => '모터타입',
|
||||
'parameters.material_grade' => '자재등급',
|
||||
'company_name' => '업체명'
|
||||
'company_name' => '업체명',
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public function authorize(): bool
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'company_name' => 'nullable|string|max:100'
|
||||
'company_name' => 'nullable|string|max:100',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public function messages(): array
|
||||
{
|
||||
return [
|
||||
'company_name.string' => __('error.validation.string'),
|
||||
'company_name.max' => __('error.validation.max.string')
|
||||
'company_name.max' => __('error.validation.max.string'),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Design\Model;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool { return true; }
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'code' => 'required|string|max:100',
|
||||
'name' => 'required|string|max:200',
|
||||
'code' => 'required|string|max:100',
|
||||
'name' => 'required|string|max:200',
|
||||
'category_id' => 'nullable|integer',
|
||||
'lifecycle' => 'nullable|string|max:50',
|
||||
'lifecycle' => 'nullable|string|max:50',
|
||||
'description' => 'nullable|string',
|
||||
'is_active' => 'boolean',
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public function rules(): array
|
||||
'validation_rules.*.field' => 'nullable|string|max:50',
|
||||
'validation_rules.*.rule' => 'nullable|string|max:200',
|
||||
'validation_rules.*.message' => 'nullable|string|max:200',
|
||||
'description' => 'nullable|string|max:500'
|
||||
'description' => 'nullable|string|max:500',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public function messages(): array
|
||||
'validation_rules.*.message.string' => __('error.validation.string'),
|
||||
'validation_rules.*.message.max' => __('error.validation.max.string'),
|
||||
'description.string' => __('error.validation.string'),
|
||||
'description.max' => __('error.validation.max.string')
|
||||
'description.max' => __('error.validation.max.string'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ public function attributes(): array
|
||||
'validation_rules.*.field' => '검증 필드',
|
||||
'validation_rules.*.rule' => '검증 규칙',
|
||||
'validation_rules.*.message' => '검증 메시지',
|
||||
'description' => '설명'
|
||||
'description' => '설명',
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,4 +35,4 @@ public function messages(): array
|
||||
'parameters.array' => __('validation.array', ['attribute' => '견적 파라미터']),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,4 +33,4 @@ public function messages(): array
|
||||
'status.in' => __('validation.in', ['attribute' => '상태']),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user