31 lines
671 B
PHP
31 lines
671 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Presentation\Api\V1\Http\Requests\IncoSheets;
|
|
|
|
use Domain\Models\ValueObjects\Inco\IncoId;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
final class IncoSheetsShowRequest extends FormRequest
|
|
{
|
|
/** @return array<string, array<int, mixed>> */
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'incoId' => ['required', 'string'],
|
|
];
|
|
}
|
|
|
|
protected function prepareForValidation(): void
|
|
{
|
|
$this->merge([
|
|
'incoId' => $this->route('incoId'),
|
|
]);
|
|
}
|
|
|
|
public function incoId(): IncoId
|
|
{
|
|
return new IncoId($this->string('incoId')->value());
|
|
}
|
|
}
|