@@ -15,25 +15,25 @@ |
||
15 | 15 | public function __construct(Applicant $applicant) |
16 | 16 | { |
17 | 17 | $this->applicant = $applicant; |
18 | - $this->course_status_ids = CourseStatus::all()->pluck('id'); |
|
18 | + $this->course_status_ids = CourseStatus::all ()->pluck ('id'); |
|
19 | 19 | } |
20 | 20 | public function validate(CourseValidator $courseValidator) |
21 | 21 | { |
22 | - $uniqueSkillRule = new UniqueApplicantSkillRule($this->applicant, $courseValidator->id); |
|
22 | + $uniqueSkillRule = new UniqueApplicantSkillRule ($this->applicant, $courseValidator->id); |
|
23 | 23 | //This array is reset every time because applicants table can change frequently |
24 | - $applicant_ids = Applicant::all()->pluck('id'); |
|
24 | + $applicant_ids = Applicant::all ()->pluck ('id'); |
|
25 | 25 | //Validate basic data is filled in |
26 | - Validator::make($courseValidator->getAttributes(), [ |
|
26 | + Validator::make ($courseValidator->getAttributes (), [ |
|
27 | 27 | 'applicant_id' => [ |
28 | 28 | 'required', |
29 | - Rule::in($applicant_ids->toArray()), |
|
29 | + Rule::in ($applicant_ids->toArray ()), |
|
30 | 30 | ], |
31 | 31 | 'course_status_id' => [ |
32 | 32 | 'required', |
33 | - Rule::in($this->course_status_ids->toArray()), |
|
33 | + Rule::in ($this->course_status_ids->toArray ()), |
|
34 | 34 | ] |
35 | 35 | |
36 | - ])->validate(); |
|
36 | + ])->validate (); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | } |
40 | 40 | \ No newline at end of file |
@@ -17,15 +17,15 @@ |
||
17 | 17 | */ |
18 | 18 | public static function validateUnpublished(JobPoster $jobPoster) |
19 | 19 | { |
20 | - Validator::make( |
|
21 | - $jobPoster->toArray(), |
|
20 | + Validator::make ( |
|
21 | + $jobPoster->toArray (), |
|
22 | 22 | [ |
23 | 23 | 'published' => [ |
24 | 24 | 'required', |
25 | - Rule::in([false]) |
|
25 | + Rule::in ([false]) |
|
26 | 26 | ] |
27 | 27 | ] |
28 | - )->validate(); |
|
28 | + )->validate (); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function __construct() |
26 | 26 | { |
27 | - $this->relationshipIds = Relationship::all()->pluck('id')->toArray(); |
|
27 | + $this->relationshipIds = Relationship::all ()->pluck ('id')->toArray (); |
|
28 | 28 | } |
29 | 29 | /** |
30 | 30 | * Get the validation rules that apply to the request. |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | ], |
44 | 44 | 'relationship_id' => [ |
45 | 45 | 'required', |
46 | - Rule::in($this->relationshipIds) |
|
46 | + Rule::in ($this->relationshipIds) |
|
47 | 47 | ], |
48 | 48 | 'description' => 'required|string', |
49 | 49 | |
@@ -68,6 +68,6 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function validator(array $data) : \Illuminate\Validation\Validator |
70 | 70 | { |
71 | - return Validator::make($data, $this->rules()); |
|
71 | + return Validator::make ($data, $this->rules ()); |
|
72 | 72 | } |
73 | 73 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function __construct() |
26 | 26 | { |
27 | - $this->fileTypeIds = FileType::all()->pluck('id')->toArray(); |
|
27 | + $this->fileTypeIds = FileType::all ()->pluck ('id')->toArray (); |
|
28 | 28 | } |
29 | 29 | /** |
30 | 30 | * Get the validation rules that apply to the request. |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | 'name' => 'required|string|max:191', |
39 | 39 | 'file_type_id' => [ |
40 | 40 | 'required', |
41 | - Rule::in($this->fileTypeIds) |
|
41 | + Rule::in ($this->fileTypeIds) |
|
42 | 42 | ], |
43 | 43 | 'url' => 'required|url', |
44 | 44 | 'description' => 'required|string', |
@@ -57,6 +57,6 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function validator(array $data) : \Illuminate\Validation\Validator |
59 | 59 | { |
60 | - return Validator::make($data, $this->rules()); |
|
60 | + return Validator::make ($data, $this->rules ()); |
|
61 | 61 | } |
62 | 62 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | 'email', |
50 | 50 | // Email may match existing email for this user, |
51 | 51 | // but must be unique if changed. |
52 | - Rule::unique('users', 'email')->ignore($this->applicant->user->id) |
|
52 | + Rule::unique ('users', 'email')->ignore ($this->applicant->user->id) |
|
53 | 53 | ], |
54 | 54 | |
55 | 55 | // Password validation. |
@@ -99,6 +99,6 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function validator(array $data) : \Illuminate\Validation\Validator |
101 | 101 | { |
102 | - return Validator::make($data, $this->rules()); |
|
102 | + return Validator::make ($data, $this->rules ()); |
|
103 | 103 | } |
104 | 104 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function validate(array $data): void |
16 | 16 | { |
17 | - $this->validator($data)->validate(); |
|
17 | + $this->validator ($data)->validate (); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
@@ -25,6 +25,6 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function isValid(array $data) : bool |
27 | 27 | { |
28 | - return $this->validator($data)->passes(); |
|
28 | + return $this->validator ($data)->passes (); |
|
29 | 29 | } |
30 | 30 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | public function getFunctions(): array |
14 | 14 | { |
15 | 15 | return [ |
16 | - new Twig_SimpleFunction('handleNullState', [$this, 'handleNullState']), |
|
16 | + new Twig_SimpleFunction ('handleNullState', [$this, 'handleNullState']), |
|
17 | 17 | ]; |
18 | 18 | } |
19 | 19 |
@@ -50,31 +50,31 @@ |
||
50 | 50 | |
51 | 51 | public function skill()// phpcs:ignore |
52 | 52 | { |
53 | - return $this->belongsTo(\App\Models\Skill::class); |
|
53 | + return $this->belongsTo (\App\Models\Skill::class); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | public function skill_status()// phpcs:ignore |
57 | 57 | { |
58 | - return $this->belongsTo(\App\Models\Lookup\SkillStatus::class); |
|
58 | + return $this->belongsTo (\App\Models\Lookup\SkillStatus::class); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public function skill_level()// phpcs:ignore |
62 | 62 | { |
63 | - return $this->belongsTo(\App\Models\Lookup\SkillLevel::class); |
|
63 | + return $this->belongsTo (\App\Models\Lookup\SkillLevel::class); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | public function applicant()// phpcs:ignore |
67 | 67 | { |
68 | - return $this->belongsTo(\App\Models\Applicant::class); |
|
68 | + return $this->belongsTo (\App\Models\Applicant::class); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | public function references()// phpcs:ignore |
72 | 72 | { |
73 | - return $this->belongsToMany(\App\Models\Reference::class); |
|
73 | + return $this->belongsToMany (\App\Models\Reference::class); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | public function work_samples()// phpcs:ignore |
77 | 77 | { |
78 | - return $this->belongsToMany(\App\Models\WorkSample::class); |
|
78 | + return $this->belongsToMany (\App\Models\WorkSample::class); |
|
79 | 79 | } |
80 | 80 | } |
@@ -55,54 +55,54 @@ |
||
55 | 55 | |
56 | 56 | public function user() |
57 | 57 | { |
58 | - return $this->belongsTo(\App\Models\User::class); |
|
58 | + return $this->belongsTo (\App\Models\User::class); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | public function applicant_profile_answers() |
62 | 62 | { |
63 | - return $this->hasMany(\App\Models\ApplicantProfileAnswer::class); |
|
63 | + return $this->hasMany (\App\Models\ApplicantProfileAnswer::class); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | public function job_applications() |
67 | 67 | { |
68 | 68 | if ($this->is_snapshot) { |
69 | - return $this->hasMany(\App\Models\JobApplication::class, 'applicant_snapshot_id'); |
|
69 | + return $this->hasMany (\App\Models\JobApplication::class, 'applicant_snapshot_id'); |
|
70 | 70 | } |
71 | - return $this->hasMany(\App\Models\JobApplication::class); |
|
71 | + return $this->hasMany (\App\Models\JobApplication::class); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | public function degrees() |
75 | 75 | { |
76 | - return $this->hasMany(\App\Models\Degree::class)->orderBy('end_date', 'desc'); |
|
76 | + return $this->hasMany (\App\Models\Degree::class)->orderBy ('end_date', 'desc'); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | public function courses() |
80 | 80 | { |
81 | - return $this->hasMany(\App\Models\Course::class)->orderBy('end_date', 'desc'); |
|
81 | + return $this->hasMany (\App\Models\Course::class)->orderBy ('end_date', 'desc'); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | public function work_experiences() |
85 | 85 | { |
86 | - return $this->hasMany(\App\Models\WorkExperience::class)->orderBy('end_date', 'desc'); |
|
86 | + return $this->hasMany (\App\Models\WorkExperience::class)->orderBy ('end_date', 'desc'); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | public function skill_declarations() |
90 | 90 | { |
91 | - return $this->hasMany(\App\Models\SkillDeclaration::class); |
|
91 | + return $this->hasMany (\App\Models\SkillDeclaration::class); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | public function references() |
95 | 95 | { |
96 | - return $this->hasMany(\App\Models\Reference::class); |
|
96 | + return $this->hasMany (\App\Models\Reference::class); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | public function work_samples() |
100 | 100 | { |
101 | - return $this->hasMany(\App\Models\WorkSample::class); |
|
101 | + return $this->hasMany (\App\Models\WorkSample::class); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | public function projects() |
105 | 105 | { |
106 | - return $this->hasMany(\App\Models\Project::class); |
|
106 | + return $this->hasMany (\App\Models\Project::class); |
|
107 | 107 | } |
108 | 108 | } |