Passed
Push — feature/job-builder/tasks-redu... ( c339d7...5b5e8a )
by Tristan
12:46
created

BatchUpdateJobTask::rules()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace App\Http\Requests;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
use Illuminate\Support\Facades\Config;
7
use App\Services\Validation\Rules\ValidIdRule;
8
use App\Models\Lookup\Department;
9
use App\Models\Lookup\Province;
10
use App\Models\Lookup\SecurityClearance;
11
use App\Models\Lookup\LanguageRequirement;
12
use App\Models\JobPoster;
13
use App\Models\Lookup\Frequency;
14
15
class BatchUpdateJobTask extends FormRequest
16
{
17
    /**
18
     * Determine if the user is authorized to make this request.
19
     *
20
     * @return boolean
21
     */
22 4
    public function authorize(): bool
23
    {
24 4
        return true;
25
    }
26
27
    /**
28
     * Get the validation rules that apply to the request.
29
     *
30
     * @return string[]
31
     */
32 4
    public function rules(): array
33
    {
34
        return [
35 4
            '*.id' => 'present',
36
            '*.en.description' => 'nullable|string',
37
            '*.fr.description' => 'nullable|string',
38
        ];
39
    }
40
}
41