@@ -119,27 +119,27 @@ discard block |
||
119 | 119 | |
120 | 120 | public function user() |
121 | 121 | { |
122 | - return $this->belongsTo(\App\Models\User::class); |
|
122 | + return $this->belongsTo (\App\Models\User::class); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | public function department() |
126 | 126 | { |
127 | - return $this->belongsTo(\App\Models\Lookup\Department::class); |
|
127 | + return $this->belongsTo (\App\Models\Lookup\Department::class); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | public function job_posters() //phpcs:ignore |
131 | 131 | { |
132 | - return $this->hasMany(\App\Models\JobPoster::class); |
|
132 | + return $this->hasMany (\App\Models\JobPoster::class); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | public function work_environment() //phpcs:ignore |
136 | 136 | { |
137 | - return $this->hasOne(\App\Models\WorkEnvironment::class)->withDefault(); |
|
137 | + return $this->hasOne (\App\Models\WorkEnvironment::class)->withDefault (); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | public function team_culture() //phpcs:ignore |
141 | 141 | { |
142 | - return $this->hasOne(\App\Models\TeamCulture::class)->withDefault(); |
|
142 | + return $this->hasOne (\App\Models\TeamCulture::class)->withDefault (); |
|
143 | 143 | } |
144 | 144 | /* |
145 | 145 | * @property \App\Models\Lookup\Frequency $review_options |
@@ -156,27 +156,27 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function work_review_frequency() //phpcs:ignore |
158 | 158 | { |
159 | - return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
159 | + return $this->belongsTo (\App\Models\Lookup\Frequency::class); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | public function stay_late_frequency() //phpcs:ignore |
163 | 163 | { |
164 | - return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
164 | + return $this->belongsTo (\App\Models\Lookup\Frequency::class); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | public function engage_team_frequency() //phpcs:ignore |
168 | 168 | { |
169 | - return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
169 | + return $this->belongsTo (\App\Models\Lookup\Frequency::class); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | public function development_opportunity_frequency() //phpcs:ignore |
173 | 173 | { |
174 | - return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
174 | + return $this->belongsTo (\App\Models\Lookup\Frequency::class); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | public function refuse_low_value_work_frequency() //phpcs:ignore |
178 | 178 | { |
179 | - return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
179 | + return $this->belongsTo (\App\Models\Lookup\Frequency::class); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | public function getFullNameAttribute(): string |
188 | 188 | { |
189 | 189 | if ($this->user !== null) { |
190 | - return $this->user->first_name . ' ' . $this->user->last_name; |
|
190 | + return $this->user->first_name.' '.$this->user->last_name; |
|
191 | 191 | } |
192 | 192 | return ''; |
193 | 193 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | public function getIsDemoManagerAttribute(): bool |
227 | 227 | { |
228 | 228 | if ($this->user !== null) { |
229 | - return $this->user->isDemoManager(); |
|
229 | + return $this->user->isDemoManager (); |
|
230 | 230 | } |
231 | 231 | return true; |
232 | 232 | } |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | */ |
240 | 240 | public function toApiArray() |
241 | 241 | { |
242 | - $withTranslations = array_merge($this->toArray(), $this->getTranslationsArray()); |
|
242 | + $withTranslations = array_merge ($this->toArray (), $this->getTranslationsArray ()); |
|
243 | 243 | return $withTranslations; |
244 | 244 | } |
245 | 245 | } |
@@ -92,27 +92,27 @@ discard block |
||
92 | 92 | |
93 | 93 | public function applicant() //phpcs:ignore |
94 | 94 | { |
95 | - return $this->hasOne(\App\Models\Applicant::class); |
|
95 | + return $this->hasOne (\App\Models\Applicant::class); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | public function manager() //phpcs:ignore |
99 | 99 | { |
100 | - return $this->hasOne(\App\Models\Manager::class); |
|
100 | + return $this->hasOne (\App\Models\Manager::class); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | public function hr_advisor() //phpcs:ignore |
104 | 104 | { |
105 | - return $this->hasOne(\App\Models\HrAdvisor::class); |
|
105 | + return $this->hasOne (\App\Models\HrAdvisor::class); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | public function profile_pic() //phpcs:ignore |
109 | 109 | { |
110 | - return $this->hasOne(\App\Models\ProfilePic::class); |
|
110 | + return $this->hasOne (\App\Models\ProfilePic::class); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | public function user_role() //phpcs:ignore |
114 | 114 | { |
115 | - return $this->belongsTo(\App\Models\UserRole::class); |
|
115 | + return $this->belongsTo (\App\Models\UserRole::class); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | public function setIsPriorityAttribute($value) |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | public function isUpgradedManager(): bool |
145 | 145 | { |
146 | - return $this->isAdmin() || $this->user_role->name === 'upgradedManager'; |
|
146 | + return $this->isAdmin () || $this->user_role->name === 'upgradedManager'; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | public function isDemoManager(): bool |
155 | 155 | { |
156 | 156 | // Currently, every non-upgradedManager user can be considered a demoManager. |
157 | - return !$this->isUpgradedManager(); |
|
157 | + return !$this->isUpgradedManager (); |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | /** |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | public function isManager(): bool |
166 | 166 | { |
167 | 167 | // Currently, every user can use the Manager portal as a demoManager. |
168 | - return $this->isDemoManager() || $this->isUpgradedManager(); |
|
168 | + return $this->isDemoManager () || $this->isUpgradedManager (); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
@@ -198,13 +198,13 @@ discard block |
||
198 | 198 | { |
199 | 199 | switch ($role) { |
200 | 200 | case 'applicant': |
201 | - return $this->isApplicant(); |
|
201 | + return $this->isApplicant (); |
|
202 | 202 | case 'manager': |
203 | - return $this->isManager(); |
|
203 | + return $this->isManager (); |
|
204 | 204 | case 'hr_advisor': |
205 | - return $this->isHrAdvisor(); |
|
205 | + return $this->isHrAdvisor (); |
|
206 | 206 | case 'admin': |
207 | - return $this->isAdmin(); |
|
207 | + return $this->isAdmin (); |
|
208 | 208 | default: |
209 | 209 | return false; |
210 | 210 | } |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | */ |
219 | 219 | public function setRole(string $role): void |
220 | 220 | { |
221 | - $this->user_role()->associate(UserRole::where('name', $role)->firstOrFail()); |
|
221 | + $this->user_role ()->associate (UserRole::where ('name', $role)->firstOrFail ()); |
|
222 | 222 | } |
223 | 223 | |
224 | 224 | /** |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | */ |
232 | 232 | public function sendPasswordResetNotification($token): void |
233 | 233 | { |
234 | - $this->notify(new ResetPasswordNotification($token)); |
|
234 | + $this->notify (new ResetPasswordNotification ($token)); |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | /** |
@@ -253,6 +253,6 @@ discard block |
||
253 | 253 | */ |
254 | 254 | public function getFullNameAttribute(): string |
255 | 255 | { |
256 | - return $this->first_name . ' ' . $this->last_name; |
|
256 | + return $this->first_name.' '.$this->last_name; |
|
257 | 257 | } |
258 | 258 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * |
20 | 20 | * @property \App\Models\JobPosterKeyTask $job_poster_key_task |
21 | 21 | */ |
22 | -class JobPosterKeyTaskTranslation extends BaseModel { |
|
22 | +class JobPosterKeyTaskTranslation extends BaseModel{ |
|
23 | 23 | |
24 | 24 | protected $casts = [ |
25 | 25 | 'job_poster_key_task_id' => 'int' |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | 'description' |
30 | 30 | ]; |
31 | 31 | |
32 | - public function job_poster_key_task() { |
|
33 | - return $this->belongsTo(\App\Models\JobPosterKeyTask::class); |
|
32 | + public function job_poster_key_task(){ |
|
33 | + return $this->belongsTo (\App\Models\JobPosterKeyTask::class); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | } |
@@ -58,17 +58,17 @@ discard block |
||
58 | 58 | |
59 | 59 | public function managers() // phpcs:ignore |
60 | 60 | { |
61 | - return $this->hasMany(\App\Models\Manager::class); |
|
61 | + return $this->hasMany (\App\Models\Manager::class); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | public function department_translations() // phpcs:ignore |
65 | 65 | { |
66 | - return $this->hasMany(\App\Models\Lookup\DepartmentTranslation::class); |
|
66 | + return $this->hasMany (\App\Models\Lookup\DepartmentTranslation::class); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | public function job_posters() // phpcs:ignore |
70 | 70 | { |
71 | - return $this->hasMany(\App\Models\JobPoster::class); |
|
71 | + return $this->hasMany (\App\Models\JobPoster::class); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | $deptArray = ['id' => $this->id]; |
82 | 82 | foreach (['en', 'fr'] as $locale) { |
83 | 83 | $deptArray[$locale] = [ |
84 | - 'name' => $this->getTranslation('name', $locale), |
|
85 | - 'impact' => $this->getTranslation('impact', $locale), |
|
84 | + 'name' => $this->getTranslation ('name', $locale), |
|
85 | + 'impact' => $this->getTranslation ('impact', $locale), |
|
86 | 86 | ]; |
87 | 87 | } |
88 | 88 | return $deptArray; |
@@ -21,15 +21,15 @@ |
||
21 | 21 | * |
22 | 22 | * @property \App\Models\Lookup\SecurityClearance $security_clearance |
23 | 23 | */ |
24 | -class SecurityClearanceTranslation extends BaseModel { |
|
24 | +class SecurityClearanceTranslation extends BaseModel{ |
|
25 | 25 | |
26 | 26 | protected $casts = [ |
27 | 27 | 'security_clearance_id' => 'int' |
28 | 28 | ]; |
29 | 29 | protected $fillable = []; |
30 | 30 | |
31 | - public function security_clearance() { |
|
32 | - return $this->belongsTo(\App\Models\Lookup\SecurityClearance::class); |
|
31 | + public function security_clearance(){ |
|
32 | + return $this->belongsTo (\App\Models\Lookup\SecurityClearance::class); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | } |
@@ -21,15 +21,15 @@ |
||
21 | 21 | * |
22 | 22 | * @property \App\Models\Lookup\Province $province |
23 | 23 | */ |
24 | -class ProvinceTranslation extends BaseModel { |
|
24 | +class ProvinceTranslation extends BaseModel{ |
|
25 | 25 | |
26 | 26 | protected $casts = [ |
27 | 27 | 'province_id' => 'int' |
28 | 28 | ]; |
29 | 29 | protected $fillable = []; |
30 | 30 | |
31 | - public function province() { |
|
32 | - return $this->belongsTo(\App\Models\Lookup\Province::class); |
|
31 | + public function province(){ |
|
32 | + return $this->belongsTo (\App\Models\Lookup\Province::class); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | } |
@@ -34,11 +34,11 @@ |
||
34 | 34 | |
35 | 35 | public function job_posters() //phpcs:ignore |
36 | 36 | { |
37 | - return $this->hasMany(\App\Models\JobPoster::class); |
|
37 | + return $this->hasMany (\App\Models\JobPoster::class); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public function security_clearance_translations() //phpcs:ignore |
41 | 41 | { |
42 | - return $this->hasMany(\App\Models\Lookup\SecurityClearanceTranslation::class); |
|
42 | + return $this->hasMany (\App\Models\Lookup\SecurityClearanceTranslation::class); |
|
43 | 43 | } |
44 | 44 | } |
@@ -34,11 +34,11 @@ |
||
34 | 34 | |
35 | 35 | public function job_posters() //phpcs:ignore |
36 | 36 | { |
37 | - return $this->hasMany(\App\Models\JobPoster::class); |
|
37 | + return $this->hasMany (\App\Models\JobPoster::class); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public function language_requirement_translations() //phpcs:ignore |
41 | 41 | { |
42 | - return $this->hasMany(\App\Models\Lookup\LanguageRequirementTranslation::class); |
|
42 | + return $this->hasMany (\App\Models\Lookup\LanguageRequirementTranslation::class); |
|
43 | 43 | } |
44 | 44 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @property \App\Models\Lookup\AssessmentType $assessment_type |
23 | 23 | */ |
24 | -class AssessmentTypeTranslation extends BaseModel { |
|
24 | +class AssessmentTypeTranslation extends BaseModel{ |
|
25 | 25 | |
26 | 26 | protected $casts = [ |
27 | 27 | 'id' => 'int', |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | 'name', |
34 | 34 | ]; |
35 | 35 | |
36 | - public function assessment_type() { |
|
37 | - return $this->belongsTo(\App\Models\Lookup\AssessmentType::class); |
|
36 | + public function assessment_type(){ |
|
37 | + return $this->belongsTo (\App\Models\Lookup\AssessmentType::class); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | } |