Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
GenerateICPRolePlayProjectRequest
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 authorize
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 rules
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace App\Http\Requests\v2\RolePlay;
4
5use App\Http\Models\RolePlayProjects;
6use Illuminate\Foundation\Http\FormRequest;
7use Illuminate\Validation\Rule;
8
9class GenerateICPRolePlayProjectRequest extends FormRequest
10{
11    /**
12     * Determine if the user is authorized to make this request.
13     *
14     * @return bool
15     */
16    public function authorize(): bool
17    {
18        return true;
19    }
20
21    /**
22     * Get the validation rules that apply to the request.
23     *
24     * @return array
25     */
26    public function rules(): array
27    {
28        return [
29            'type' => ['required', 'string', Rule::in([RolePlayProjects::$COLD_CALL, RolePlayProjects::$DISCOVERY_CALL])],
30            'industry' => ['required', 'string'],
31            'product_description' => ['required', 'string'],
32        ];
33    }
34}