Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| UpdatePromptLengthOfPostRequest | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| rules | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Http\Requests\v2\PromptLengthOfPost; |
| 4 | |
| 5 | use App\Http\Requests\v2\Parameter\Concerns\AuthorizesVengresoAdmin; |
| 6 | use Illuminate\Foundation\Http\FormRequest; |
| 7 | |
| 8 | /** |
| 9 | * Request for updating an existing prompt length of post. |
| 10 | * |
| 11 | * @property string|null $name The length name |
| 12 | * @property string|null $prompt The prompt text that instructs the AI on target word count |
| 13 | */ |
| 14 | class UpdatePromptLengthOfPostRequest extends FormRequest |
| 15 | { |
| 16 | use AuthorizesVengresoAdmin; |
| 17 | |
| 18 | /** |
| 19 | * Get the validation rules that apply to the request. |
| 20 | * |
| 21 | * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
| 22 | */ |
| 23 | public function rules(): array |
| 24 | { |
| 25 | return [ |
| 26 | 'name' => 'sometimes|string|max:255', |
| 27 | 'prompt' => 'sometimes|string', |
| 28 | ]; |
| 29 | } |
| 30 | } |