@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | /** |
| 63 | 63 | * Return a copy of $array, with function $fn applied to each key, but values left unchanged. |
| 64 | 64 | * |
| 65 | - * @param function $fn Function applied to each key. |
|
| 65 | + * @param \Closure $fn Function applied to each key. |
|
| 66 | 66 | * @param array $array Array to operate on. |
| 67 | 67 | * @return array |
| 68 | 68 | */ |
@@ -75,6 +75,9 @@ discard block |
||
| 75 | 75 | return $newArray; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | + /** |
|
| 79 | + * @param string $nestedAttribute |
|
| 80 | + */ |
|
| 78 | 81 | protected function addNestedValidatorRules($nestedAttribute, $validatorRules, $rules = []) { |
| 79 | 82 | // prepend the attribute name of each validator rule with the nested attribute name |
| 80 | 83 | $newRules = $this->arrayMapKeys(function($key) use ($nestedAttribute) { |
@@ -130,6 +133,9 @@ discard block |
||
| 130 | 133 | return $this->experienceValidator($application)->passes(); |
| 131 | 134 | } |
| 132 | 135 | |
| 136 | + /** |
|
| 137 | + * @param string $criteria_type |
|
| 138 | + */ |
|
| 133 | 139 | protected function skillsValidator(JobApplication $application, $criteria_type) { |
| 134 | 140 | $rules = []; |
| 135 | 141 | |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use App\Models\JobApplication; |
| 6 | 6 | use Illuminate\Support\Facades\Validator; |
| 7 | 7 | use Illuminate\Validation\Rule; |
| 8 | -use Illuminate\Validation\Validator as BaseValidator; |
|
| 9 | 8 | use App\Models\Lookup\CitizenshipDeclaration; |
| 10 | 9 | use App\Models\Lookup\CriteriaType; |
| 11 | 10 | use App\Models\Lookup\VeteranStatus; |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace App\Services\Validation\Rules; |
| 4 | 4 | |
| 5 | 5 | use Illuminate\Contracts\Validation\Rule; |
| 6 | -use Illuminate\Support\Facades\Hash; |
|
| 7 | -use Illuminate\Support\Facades\Auth; |
|
| 8 | 6 | use Illuminate\Support\Facades\Lang; |
| 9 | 7 | use App\Models\Applicant; |
| 10 | 8 | |
@@ -14,8 +14,7 @@ |
||
| 14 | 14 | /** |
| 15 | 15 | * Create a new rule instance. |
| 16 | 16 | * |
| 17 | - * @param App\Models\Applicant $applicant |
|
| 18 | - * @param string $relation |
|
| 17 | + * @param string $attributeName |
|
| 19 | 18 | * @return void |
| 20 | 19 | */ |
| 21 | 20 | public function __construct($attributeName, $attributeValue) |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace App\Services\Validation; |
| 3 | 3 | use Illuminate\Support\Facades\Validator; |
| 4 | 4 | use Illuminate\Validation\Rule; |
| 5 | -use App\Models\Course; |
|
| 6 | 5 | use App\Models\Lookup\CourseStatus; |
| 7 | 6 | use App\Models\Applicant; |
| 8 | 7 | use App\Services\Validation\Rules\UniqueApplicantSkillRule; |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace App\Services\Validation; |
| 3 | 3 | use Illuminate\Support\Facades\Validator; |
| 4 | 4 | use Illuminate\Validation\Rule; |
| 5 | -use App\Models\Degree; |
|
| 6 | 5 | use App\Models\Lookup\DegreeType; |
| 7 | 6 | use App\Models\Applicant; |
| 8 | 7 | use App\Services\Validation\Rules\UniqueApplicantSkillRule; |
@@ -13,8 +13,6 @@ |
||
| 13 | 13 | /** |
| 14 | 14 | * Create a new rule instance. |
| 15 | 15 | * |
| 16 | - * @param App\Models\Applicant $applicant |
|
| 17 | - * @param string $relation |
|
| 18 | 16 | * @return void |
| 19 | 17 | */ |
| 20 | 18 | public function __construct($validator) |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace App\Services\Validation; |
| 3 | 3 | use Illuminate\Support\Facades\Validator; |
| 4 | 4 | use Illuminate\Validation\Rule; |
| 5 | -use App\Models\Reference; |
|
| 6 | 5 | use App\Services\Validation\Rules\UniqueApplicantSkillRule; |
| 7 | 6 | class ReferencesValidator |
| 8 | 7 | { |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace App\Services\Validation\Rules; |
| 4 | 4 | |
| 5 | 5 | use Illuminate\Contracts\Validation\Rule; |
| 6 | -use Illuminate\Support\Facades\Hash; |
|
| 7 | 6 | use Illuminate\Support\Facades\Auth; |
| 8 | 7 | use Illuminate\Support\Facades\Lang; |
| 9 | 8 | use App\Models\SkillDeclaration; |
@@ -17,7 +17,6 @@ |
||
| 17 | 17 | /** |
| 18 | 18 | * Create a new rule instance. |
| 19 | 19 | * |
| 20 | - * @param App\Models\Applicant $user |
|
| 21 | 20 | * @return void |
| 22 | 21 | */ |
| 23 | 22 | public function __construct(Applicant $applicant, $skill_declaration_id = null) |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace App\Services\Validation\Rules; |
| 4 | 4 | |
| 5 | 5 | use Illuminate\Contracts\Validation\Rule; |
| 6 | -use Illuminate\Support\Facades\Hash; |
|
| 7 | -use Illuminate\Support\Facades\Auth; |
|
| 8 | 6 | use Illuminate\Support\Facades\Lang; |
| 9 | 7 | use App\Models\Applicant; |
| 10 | 8 | |