Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
IndexRolePlayPersonasRequest | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
authorize | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
rules | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace App\Http\Requests\v2\RolePlay; |
4 | |
5 | use App\Http\Models\RolePlayProjects; |
6 | use Illuminate\Foundation\Http\FormRequest; |
7 | use Illuminate\Validation\Rule; |
8 | |
9 | class IndexRolePlayPersonasRequest extends FormRequest |
10 | { |
11 | /** |
12 | * Determine if the user is authorized to make this request. |
13 | * |
14 | * @return bool |
15 | */ |
16 | public function authorize() |
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() |
27 | { |
28 | return [ |
29 | 'type' => ['sometimes', 'string', Rule::in([RolePlayProjects::$COLD_CALL, RolePlayProjects::$DISCOVERY_CALL])], |
30 | 'lastPracticed' => ['sometimes', 'integer', Rule::in([7, 15, 30, 60, 90, 120])], |
31 | ]; |
32 | } |
33 | } |