@@ -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 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * |
20 | 20 | * @property \App\Models\WorkplacePhotoCaption $workplace_photo_caption |
21 | 21 | */ |
22 | -class WorkplacePhoto extends BaseModel { |
|
22 | +class WorkplacePhoto extends BaseModel{ |
|
23 | 23 | |
24 | 24 | protected $casts = [ |
25 | 25 | 'image' => 'boolean', |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | 'image' |
30 | 30 | ]; |
31 | 31 | |
32 | - public function workplace_photo_caption() { |
|
32 | + public function workplace_photo_caption(){ |
|
33 | 33 | return $this->hasOne(\App\Models\WorkplacePhotoCaption::class); |
34 | 34 | } |
35 | 35 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @property \Illuminate\Database\Eloquent\Collection $skill_declarations |
47 | 47 | * @property \App\Models\ApplicationReview $application_review |
48 | 48 | */ |
49 | -class JobApplication extends BaseModel { |
|
49 | +class JobApplication extends BaseModel{ |
|
50 | 50 | |
51 | 51 | use Notifiable; |
52 | 52 | |
@@ -85,51 +85,51 @@ discard block |
||
85 | 85 | */ |
86 | 86 | protected $appends = ['meets_essential_criteria']; |
87 | 87 | |
88 | - protected function createApplicantSnapshot($applicant_id) { |
|
88 | + protected function createApplicantSnapshot($applicant_id){ |
|
89 | 89 | $applicant = Applicant::where('id', $applicant_id)->firstOrFail(); |
90 | 90 | |
91 | 91 | $snapshot = $applicant->replicate(); |
92 | 92 | |
93 | 93 | } |
94 | 94 | |
95 | - public function applicant() { |
|
95 | + public function applicant(){ |
|
96 | 96 | return $this->belongsTo(\App\Models\Applicant::class); |
97 | 97 | } |
98 | 98 | |
99 | - public function applicant_snapshot() { |
|
99 | + public function applicant_snapshot(){ |
|
100 | 100 | return $this->belongsTo(\App\Models\Applicant::class, 'applicant_snapshot_id'); |
101 | 101 | } |
102 | 102 | |
103 | - public function application_status() { |
|
103 | + public function application_status(){ |
|
104 | 104 | return $this->belongsTo(\App\Models\Lookup\ApplicationStatus::class); |
105 | 105 | } |
106 | 106 | |
107 | - public function citizenship_declaration() { |
|
107 | + public function citizenship_declaration(){ |
|
108 | 108 | return $this->belongsTo(\App\Models\Lookup\CitizenshipDeclaration::class); |
109 | 109 | } |
110 | 110 | |
111 | - public function veteran_status() { |
|
111 | + public function veteran_status(){ |
|
112 | 112 | return $this->belongsTo(\App\Models\Lookup\VeteranStatus::class); |
113 | 113 | } |
114 | 114 | |
115 | - public function preferred_language() { |
|
115 | + public function preferred_language(){ |
|
116 | 116 | return $this->belongsTo(\App\Models\Lookup\PreferredLanguage::class); |
117 | 117 | } |
118 | 118 | |
119 | - public function job_poster() { |
|
119 | + public function job_poster(){ |
|
120 | 120 | return $this->belongsTo(\App\Models\JobPoster::class); |
121 | 121 | } |
122 | 122 | |
123 | - public function job_application_answers() { |
|
123 | + public function job_application_answers(){ |
|
124 | 124 | return $this->hasMany(\App\Models\JobApplicationAnswer::class); |
125 | 125 | } |
126 | 126 | |
127 | - public function skill_declarations() { |
|
127 | + public function skill_declarations(){ |
|
128 | 128 | return $this->applicant->skill_declarations() |
129 | 129 | ->whereIn('skill_id', $this->job_poster->criteria->pluck('skill_id')); |
130 | 130 | } |
131 | 131 | |
132 | - public function application_review() { |
|
132 | + public function application_review(){ |
|
133 | 133 | return $this->hasOne(ApplicationReview::class); |
134 | 134 | } |
135 | 135 | |
@@ -146,11 +146,11 @@ discard block |
||
146 | 146 | * |
147 | 147 | * @return string $status 'complete', 'incomplete' or 'error' |
148 | 148 | */ |
149 | - public function getSectionStatus(string $section) { |
|
149 | + public function getSectionStatus(string $section){ |
|
150 | 150 | //TODO: determine whether sections are complete or invalid |
151 | 151 | $validator = new ApplicationValidator(); |
152 | 152 | $status = 'incomplete'; |
153 | - switch($section) { |
|
153 | + switch ($section) { |
|
154 | 154 | case 'basics': |
155 | 155 | if ($validator->basicsComplete($this)) { |
156 | 156 | $status = 'complete'; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | public function meetsEssentialCriteria(): bool |
202 | 202 | { |
203 | 203 | $essentialCriteria = $this->job_poster->criteria->filter( |
204 | - function ($value, $key) { |
|
204 | + function($value, $key){ |
|
205 | 205 | return $value->criteria_type->name == 'essential'; |
206 | 206 | } |
207 | 207 | ); |
@@ -28,8 +28,8 @@ |
||
28 | 28 | * @property string $level_description The localized description of the skill level (accounts for skill type). |
29 | 29 | * |
30 | 30 | * Localized Properties: |
31 | - * @property string $description |
|
32 | - * @property string $specificity |
|
31 | + * @property string $description |
|
32 | + * @property string $specificity |
|
33 | 33 | */ |
34 | 34 | class Criteria extends BaseModel |
35 | 35 | { |
@@ -173,10 +173,10 @@ discard block |
||
173 | 173 | } |
174 | 174 | |
175 | 175 | /** |
176 | - * Check if the user has the specified role. |
|
177 | - * @param string $role This may be either 'applicant', 'manager' or 'admin'. |
|
178 | - * @return boolean |
|
179 | - */ |
|
176 | + * Check if the user has the specified role. |
|
177 | + * @param string $role This may be either 'applicant', 'manager' or 'admin'. |
|
178 | + * @return boolean |
|
179 | + */ |
|
180 | 180 | public function hasRole($role) |
181 | 181 | { |
182 | 182 | switch ($role) { |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | * Set this user to the specified role. |
196 | 196 | * |
197 | 197 | * @param string $role Must be either 'applicant', 'manager' or 'admin. |
198 | - * @return void |
|
199 | - */ |
|
198 | + * @return void |
|
199 | + */ |
|
200 | 200 | public function setRole(string $role): void |
201 | 201 | { |
202 | 202 | $this->user_role()->associate(UserRole::where('name', $role)->firstOrFail()); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | * Returns a user's full name. |
232 | 232 | * |
233 | 233 | * @return string |
234 | - */ |
|
234 | + */ |
|
235 | 235 | public function getFullNameAttribute(): string |
236 | 236 | { |
237 | 237 | return $this->first_name . ' ' . $this->last_name; |
@@ -234,6 +234,6 @@ |
||
234 | 234 | */ |
235 | 235 | public function getFullNameAttribute(): string |
236 | 236 | { |
237 | - return $this->first_name . ' ' . $this->last_name; |
|
237 | + return $this->first_name.' '.$this->last_name; |
|
238 | 238 | } |
239 | 239 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @property \App\Models\Applicant $applicant |
21 | 21 | * @property \App\Models\Lookup\ApplicantProfileQuestion $applicant_profile_question |
22 | 22 | */ |
23 | -class ApplicantProfileAnswer extends BaseModel { |
|
23 | +class ApplicantProfileAnswer extends BaseModel{ |
|
24 | 24 | |
25 | 25 | protected $casts = [ |
26 | 26 | 'applicant_id' => 'int', |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | 'applicant_profile_question' |
35 | 35 | ]; |
36 | 36 | |
37 | - public function applicant() { |
|
37 | + public function applicant(){ |
|
38 | 38 | return $this->belongsTo(\App\Models\Applicant::class); |
39 | 39 | } |
40 | 40 | |
41 | - public function applicant_profile_question() { |
|
41 | + public function applicant_profile_question(){ |
|
42 | 42 | return $this->belongsTo(\App\Models\Lookup\ApplicantProfileQuestion::class); |
43 | 43 | } |
44 | 44 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @property \App\Models\WorkEnvironment $work_environment |
22 | 22 | * @property \App\Models\WorkplacePhoto $workplace_photo |
23 | 23 | */ |
24 | -class WorkplacePhotoCaption extends BaseModel { |
|
24 | +class WorkplacePhotoCaption extends BaseModel{ |
|
25 | 25 | |
26 | 26 | protected $casts = [ |
27 | 27 | 'work_environment_id' => 'int', |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | 'description' |
33 | 33 | ]; |
34 | 34 | |
35 | - public function work_environment() { |
|
35 | + public function work_environment(){ |
|
36 | 36 | return $this->belongsTo(\App\Models\WorkEnvironment::class); |
37 | 37 | } |
38 | 38 | |
39 | - public function workplace_photo() { |
|
39 | + public function workplace_photo(){ |
|
40 | 40 | return $this->belongsTo(\App\Models\WorkplacePhoto::class); |
41 | 41 | } |
42 | 42 |
@@ -37,15 +37,15 @@ |
||
37 | 37 | */ |
38 | 38 | protected $with = ['review_status']; |
39 | 39 | |
40 | - public function job_application() { |
|
40 | + public function job_application(){ |
|
41 | 41 | return $this->belongsTo(JobApplication::class); |
42 | 42 | } |
43 | 43 | |
44 | - public function review_status() { |
|
44 | + public function review_status(){ |
|
45 | 45 | return $this->belongsTo(ReviewStatus::class); |
46 | 46 | } |
47 | 47 | |
48 | - public function getStatusAttribute() { |
|
48 | + public function getStatusAttribute(){ |
|
49 | 49 | return $this->review_status->translation; |
50 | 50 | } |
51 | 51 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @property \App\Models\JobApplication $job_application |
21 | 21 | * @property \App\Models\JobPosterQuestion $job_poster_question |
22 | 22 | */ |
23 | -class JobApplicationAnswer extends BaseModel { |
|
23 | +class JobApplicationAnswer extends BaseModel{ |
|
24 | 24 | |
25 | 25 | protected $casts = [ |
26 | 26 | 'job_poster_questions_id' => 'int', |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | 'answer' |
31 | 31 | ]; |
32 | 32 | |
33 | - public function job_application() { |
|
33 | + public function job_application(){ |
|
34 | 34 | return $this->belongsTo(\App\Models\JobApplication::class); |
35 | 35 | } |
36 | 36 | |
37 | - public function job_poster_question() { |
|
37 | + public function job_poster_question(){ |
|
38 | 38 | return $this->belongsTo(\App\Models\JobPosterQuestion::class); |
39 | 39 | } |
40 | 40 |