Conditions | 1 |
Paths | 1 |
Total Lines | 33 |
Code Lines | 31 |
Lines | 0 |
Ratio | 0 % |
Tests | 31 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
29 | 3 | public function rules(): array |
|
30 | { |
||
31 | 3 | $dateFormat = Config::get('app.api_datetime_format'); |
|
32 | 3 | $dateFormatRule = "date_format:$dateFormat"; |
|
33 | return [ |
||
34 | 3 | 'term_qty' => 'nullable|numeric', |
|
35 | 3 | 'open_date_time' =>["nullable", $dateFormatRule], |
|
36 | 3 | 'close_date_time' => ["nullable", $dateFormatRule], |
|
37 | 3 | 'start_date_time' =>["nullable", $dateFormatRule], |
|
38 | 3 | 'department_id' => ['nullable', new DepartmentRule()], |
|
39 | 3 | 'province_id' => ['nullable', new ProvinceRule()], |
|
40 | 3 | 'security_clearance_id' => ['nullable', new SecurityClearanceRule()], |
|
41 | 3 | 'language_requirement_id' => ['nullable', new LanguageRequirementRule()], |
|
42 | 3 | 'salary_min' => 'nullable|numeric', |
|
43 | 3 | 'salary_max' => 'nullable|numeric', |
|
44 | 3 | 'noc' => 'nullable|numeric', |
|
45 | 3 | 'classification_code' => 'nullable|regex:/[A-Z]{2}/', |
|
46 | 3 | 'classification_level' => 'nullable|numeric', |
|
47 | 3 | 'remote_work_allowed' => 'nullable|boolean', |
|
48 | 3 | 'en.city' => 'nullable|string', |
|
49 | 3 | 'en.title' => 'nullable|string', |
|
50 | 3 | 'en.team_impact' => 'nullable|string', |
|
51 | 3 | 'en.hire_impact' => 'nullable|string', |
|
52 | 3 | 'en.division' => 'nullable|string', |
|
53 | 3 | 'en.branch' => 'nullable|string', |
|
54 | 3 | 'en.education' => 'nullable|string', |
|
55 | 3 | 'fr.city' => 'nullable|string', |
|
56 | 3 | 'fr.title' => 'nullable|string', |
|
57 | 3 | 'fr.team_impact' => 'nullable|string', |
|
58 | 3 | 'fr.hire_impact' => 'nullable|string', |
|
59 | 3 | 'fr.division' => 'nullable|string', |
|
60 | 3 | 'fr.branch' => 'nullable|string', |
|
61 | 3 | 'fr.education' => 'nullable|string', |
|
62 | ]; |
||
65 |