@@ -28,11 +28,11 @@ |
||
28 | 28 | // Validate basic data is filled in |
29 | 29 | Validator::make($courseValidator->getAttributes(), [ |
30 | 30 | 'applicant_id' => [ |
31 | - 'required', |
|
31 | + 'required', |
|
32 | 32 | Rule::in($applicant_ids->toArray()), |
33 | 33 | ], |
34 | - 'course_status_id' => [ |
|
35 | - 'required', |
|
34 | + 'course_status_id' => [ |
|
35 | + 'required', |
|
36 | 36 | Rule::in($this->course_status_ids->toArray()), |
37 | 37 | ] |
38 | 38 |
@@ -28,11 +28,11 @@ |
||
28 | 28 | Validator::make($degreeValidator->getAttributes(), [ |
29 | 29 | 'applicant_id' => [ |
30 | 30 | 'required', |
31 | - Rule::in($applicant_ids->toArray()), |
|
31 | + Rule::in($applicant_ids->toArray()), |
|
32 | 32 | ], |
33 | 33 | 'degree_type_id' => [ |
34 | 34 | 'required', |
35 | - Rule::in($this->degree_type_id->toArray()), |
|
35 | + Rule::in($this->degree_type_id->toArray()), |
|
36 | 36 | ] |
37 | 37 | |
38 | 38 | ])->validate(); |
@@ -26,11 +26,11 @@ |
||
26 | 26 | Validator::make($workSamplesValidator->getAttributes(), [ |
27 | 27 | 'applicant_id' => [ |
28 | 28 | 'required', |
29 | - Rule::in($applicant_ids->toArray()), |
|
29 | + Rule::in($applicant_ids->toArray()), |
|
30 | 30 | ], |
31 | 31 | 'file_type_id' => [ |
32 | 32 | 'required', |
33 | - Rule::in($this->file_type_id->toArray()), |
|
33 | + Rule::in($this->file_type_id->toArray()), |
|
34 | 34 | ] |
35 | 35 | |
36 | 36 | ])->validate(); |
@@ -81,7 +81,7 @@ |
||
81 | 81 | protected function addNestedValidatorRules($nestedAttribute, $validatorRules, $rules = []) |
82 | 82 | { |
83 | 83 | // prepend the attribute name of each validator rule with the nested attribute name |
84 | - $newRules = $this->arrayMapKeys(function ($key) use ($nestedAttribute) { |
|
84 | + $newRules = $this->arrayMapKeys(function($key) use ($nestedAttribute) { |
|
85 | 85 | return implode('.', [$nestedAttribute, $key]); |
86 | 86 | }, |
87 | 87 | $validatorRules); |
@@ -81,7 +81,7 @@ |
||
81 | 81 | protected function addNestedValidatorRules($nestedAttribute, $validatorRules, $rules = []) |
82 | 82 | { |
83 | 83 | // prepend the attribute name of each validator rule with the nested attribute name |
84 | - $newRules = $this->arrayMapKeys(function ($key) use ($nestedAttribute) { |
|
84 | + $newRules = $this->arrayMapKeys(function ($key) use ($nestedAttribute){ |
|
85 | 85 | return implode('.', [$nestedAttribute, $key]); |
86 | 86 | }, |
87 | 87 | $validatorRules); |
@@ -12,11 +12,11 @@ |
||
12 | 12 | class CriteriaController extends Controller |
13 | 13 | { |
14 | 14 | /** |
15 | - * Converts a Criteria to the shape sent and recieved by the api. |
|
16 | - * |
|
17 | - * @param Criteria $model |
|
18 | - * @return void |
|
19 | - */ |
|
15 | + * Converts a Criteria to the shape sent and recieved by the api. |
|
16 | + * |
|
17 | + * @param Criteria $model |
|
18 | + * @return void |
|
19 | + */ |
|
20 | 20 | public function toApiArray(Criteria $model) |
21 | 21 | { |
22 | 22 | return array_merge($model->toArray(), $model->getTranslationsArray()); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function indexByJob(JobPoster $jobPoster) |
32 | 32 | { |
33 | - $toApiArray = array($this, 'toApiArray'); |
|
33 | + $toApiArray = array ($this, 'toApiArray'); |
|
34 | 34 | $criteriaAray = Criteria::where('job_poster_id', $jobPoster->id)->get()->map($toApiArray); |
35 | 35 | return response()->json($criteriaAray); |
36 | 36 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function batchUpdate(Request $request, JobPoster $jobPoster) |
46 | 46 | { |
47 | - $toApiArray = array($this, 'toApiArray'); |
|
47 | + $toApiArray = array ($this, 'toApiArray'); |
|
48 | 48 | |
49 | 49 | $newCriteria = collect($request->input()); // TODO: switch to validated |
50 | 50 | $oldCriteria = $jobPoster->criteria; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | - $isUnsaved = function ($criteria, $savedIds): bool { |
|
65 | + $isUnsaved = function($criteria, $savedIds): bool { |
|
66 | 66 | return !array_key_exists('id', $criteria) || !in_array($criteria['id'], $savedIds); |
67 | 67 | }; |
68 | 68 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $newSkillId = null, |
164 | 164 | $newSkillLevelId = null, |
165 | 165 | $newCriteriaTypeId = null |
166 | - ) { |
|
166 | + ){ |
|
167 | 167 | $notification = new AssessmentPlanNotification(); |
168 | 168 | $notification->job_poster_id = $criteria->job_poster_id; |
169 | 169 | $notification->type = $type; |