@@ -29,8 +29,8 @@ |
||
| 29 | 29 | 'image' |
| 30 | 30 | ]; |
| 31 | 31 | |
| 32 | - public function workplace_photo_caption() { |
|
| 33 | - return $this->hasOne(\App\Models\WorkplacePhotoCaption::class); |
|
| 32 | + public function workplace_photo_caption () { |
|
| 33 | + return $this->hasOne (\App\Models\WorkplacePhotoCaption::class); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | } |
@@ -117,29 +117,29 @@ discard block |
||
| 117 | 117 | 'is_demo_manager' |
| 118 | 118 | ]; |
| 119 | 119 | |
| 120 | - public function user() |
|
| 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 | - public function department() |
|
| 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 | - public function job_posters() //phpcs:ignore |
|
| 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 | - public function work_environment() //phpcs:ignore |
|
| 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 | - public function team_culture() //phpcs:ignore |
|
| 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 |
@@ -154,29 +154,29 @@ discard block |
||
| 154 | 154 | * development_opportunity_frequency |
| 155 | 155 | * refuse_low_value_work_frequency |
| 156 | 156 | */ |
| 157 | - public function work_review_frequency() //phpcs:ignore |
|
| 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 | - public function stay_late_frequency() //phpcs:ignore |
|
| 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 | - public function engage_team_frequency() //phpcs:ignore |
|
| 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 | - public function development_opportunity_frequency() //phpcs:ignore |
|
| 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 | - public function refuse_low_value_work_frequency() //phpcs:ignore |
|
| 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 | /** |
@@ -184,10 +184,10 @@ discard block |
||
| 184 | 184 | * |
| 185 | 185 | * @return string |
| 186 | 186 | */ |
| 187 | - public function getFullNameAttribute(): string |
|
| 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 | } |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | * |
| 198 | 198 | * @return string |
| 199 | 199 | */ |
| 200 | - public function getFirstNameAttribute(): string |
|
| 200 | + public function getFirstNameAttribute (): string |
|
| 201 | 201 | { |
| 202 | 202 | if ($this->user !== null) { |
| 203 | 203 | return $this->user->first_name; |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | * |
| 211 | 211 | * @return string |
| 212 | 212 | */ |
| 213 | - public function getLastNameAttribute(): string |
|
| 213 | + public function getLastNameAttribute (): string |
|
| 214 | 214 | { |
| 215 | 215 | if ($this->user !== null) { |
| 216 | 216 | return $this->user->last_name; |
@@ -223,10 +223,10 @@ discard block |
||
| 223 | 223 | * |
| 224 | 224 | * @return boolean |
| 225 | 225 | */ |
| 226 | - public function getIsDemoManagerAttribute(): bool |
|
| 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 | } |
@@ -237,9 +237,9 @@ discard block |
||
| 237 | 237 | * |
| 238 | 238 | * @return mixed[] |
| 239 | 239 | */ |
| 240 | - public function toApiArray() |
|
| 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 | } |
@@ -89,27 +89,27 @@ discard block |
||
| 89 | 89 | 'updated' => UserUpdated::class, |
| 90 | 90 | ]; |
| 91 | 91 | |
| 92 | - public function applicant() //phpcs:ignore |
|
| 92 | + public function applicant () //phpcs:ignore |
|
| 93 | 93 | { |
| 94 | - return $this->hasOne(\App\Models\Applicant::class); |
|
| 94 | + return $this->hasOne (\App\Models\Applicant::class); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - public function manager() //phpcs:ignore |
|
| 97 | + public function manager () //phpcs:ignore |
|
| 98 | 98 | { |
| 99 | - return $this->hasOne(\App\Models\Manager::class); |
|
| 99 | + return $this->hasOne (\App\Models\Manager::class); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - public function profile_pic() //phpcs:ignore |
|
| 102 | + public function profile_pic () //phpcs:ignore |
|
| 103 | 103 | { |
| 104 | - return $this->hasOne(\App\Models\ProfilePic::class); |
|
| 104 | + return $this->hasOne (\App\Models\ProfilePic::class); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - public function user_role() //phpcs:ignore |
|
| 107 | + public function user_role () //phpcs:ignore |
|
| 108 | 108 | { |
| 109 | - return $this->belongsTo(\App\Models\UserRole::class); |
|
| 109 | + return $this->belongsTo (\App\Models\UserRole::class); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | - public function setIsPriorityAttribute($value) |
|
| 112 | + public function setIsPriorityAttribute ($value) |
|
| 113 | 113 | { |
| 114 | 114 | if ($value === null) { |
| 115 | 115 | $value = false; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * |
| 125 | 125 | * @return boolean |
| 126 | 126 | */ |
| 127 | - public function isApplicant(): bool |
|
| 127 | + public function isApplicant (): bool |
|
| 128 | 128 | { |
| 129 | 129 | // Currently, every user can create an Applicant profile and apply to jobs. |
| 130 | 130 | return true; |
@@ -135,9 +135,9 @@ discard block |
||
| 135 | 135 | * |
| 136 | 136 | * @return boolean |
| 137 | 137 | */ |
| 138 | - public function isUpgradedManager(): bool |
|
| 138 | + public function isUpgradedManager (): bool |
|
| 139 | 139 | { |
| 140 | - return $this->isAdmin() || $this->user_role->name === 'upgradedManager'; |
|
| 140 | + return $this->isAdmin () || $this->user_role->name === 'upgradedManager'; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
@@ -145,10 +145,10 @@ discard block |
||
| 145 | 145 | * |
| 146 | 146 | * @return boolean |
| 147 | 147 | */ |
| 148 | - public function isDemoManager(): bool |
|
| 148 | + public function isDemoManager (): bool |
|
| 149 | 149 | { |
| 150 | 150 | // Currently, every non-upgradedManager user can be considered a demoManager. |
| 151 | - return !$this->isUpgradedManager(); |
|
| 151 | + return !$this->isUpgradedManager (); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | /** |
@@ -156,10 +156,10 @@ discard block |
||
| 156 | 156 | * |
| 157 | 157 | * @return boolean |
| 158 | 158 | */ |
| 159 | - public function isManager(): bool |
|
| 159 | + public function isManager (): bool |
|
| 160 | 160 | { |
| 161 | 161 | // Currently, every user can use the Manager portal as a demoManager. |
| 162 | - return $this->isDemoManager() || $this->isUpgradedManager(); |
|
| 162 | + return $this->isDemoManager () || $this->isUpgradedManager (); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | * |
| 168 | 168 | * @return boolean |
| 169 | 169 | */ |
| 170 | - public function isAdmin(): bool |
|
| 170 | + public function isAdmin (): bool |
|
| 171 | 171 | { |
| 172 | 172 | return $this->user_role->name === 'admin'; |
| 173 | 173 | } |
@@ -177,15 +177,15 @@ discard block |
||
| 177 | 177 | * @param string $role This may be either 'applicant', 'manager' or 'admin'. |
| 178 | 178 | * @return boolean |
| 179 | 179 | */ |
| 180 | - public function hasRole($role) |
|
| 180 | + public function hasRole ($role) |
|
| 181 | 181 | { |
| 182 | 182 | switch ($role) { |
| 183 | 183 | case 'applicant': |
| 184 | - return $this->isApplicant(); |
|
| 184 | + return $this->isApplicant (); |
|
| 185 | 185 | case 'manager': |
| 186 | - return $this->isManager(); |
|
| 186 | + return $this->isManager (); |
|
| 187 | 187 | case 'admin': |
| 188 | - return $this->isAdmin(); |
|
| 188 | + return $this->isAdmin (); |
|
| 189 | 189 | default: |
| 190 | 190 | return false; |
| 191 | 191 | } |
@@ -197,9 +197,9 @@ discard block |
||
| 197 | 197 | * @param string $role Must be either 'applicant', 'manager' or 'admin. |
| 198 | 198 | * @return void |
| 199 | 199 | */ |
| 200 | - public function setRole(string $role): void |
|
| 200 | + public function setRole (string $role): void |
|
| 201 | 201 | { |
| 202 | - $this->user_role()->associate(UserRole::where('name', $role)->firstOrFail()); |
|
| 202 | + $this->user_role ()->associate (UserRole::where ('name', $role)->firstOrFail ()); |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | /** |
@@ -210,9 +210,9 @@ discard block |
||
| 210 | 210 | * |
| 211 | 211 | * @return void |
| 212 | 212 | */ |
| 213 | - public function sendPasswordResetNotification($token): void |
|
| 213 | + public function sendPasswordResetNotification ($token): void |
|
| 214 | 214 | { |
| 215 | - $this->notify(new ResetPasswordNotification($token)); |
|
| 215 | + $this->notify (new ResetPasswordNotification ($token)); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | /** |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | * |
| 223 | 223 | * @return boolean |
| 224 | 224 | */ |
| 225 | - public function isGovIdentityConfirmed(): bool |
|
| 225 | + public function isGovIdentityConfirmed (): bool |
|
| 226 | 226 | { |
| 227 | 227 | return $this->not_in_gov || !empty($this->gov_email); |
| 228 | 228 | } |
@@ -232,8 +232,8 @@ discard block |
||
| 232 | 232 | * |
| 233 | 233 | * @return string |
| 234 | 234 | */ |
| 235 | - public function getFullNameAttribute(): string |
|
| 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 | } |
@@ -18,9 +18,9 @@ discard block |
||
| 18 | 18 | * |
| 19 | 19 | * @return void |
| 20 | 20 | */ |
| 21 | - public function sendPasswordResetNotification($token) : void |
|
| 21 | + public function sendPasswordResetNotification ($token) : void |
|
| 22 | 22 | { |
| 23 | - $this->notify(new ResetPasswordNotification($token)); |
|
| 23 | + $this->notify (new ResetPasswordNotification ($token)); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | * |
| 29 | 29 | * @return string |
| 30 | 30 | */ |
| 31 | - public function getEmailForPasswordReset() : string |
|
| 31 | + public function getEmailForPasswordReset () : string |
|
| 32 | 32 | { |
| 33 | 33 | return $this->email; |
| 34 | 34 | } |
@@ -29,8 +29,8 @@ |
||
| 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 | } |
@@ -56,19 +56,19 @@ discard block |
||
| 56 | 56 | 'preference', |
| 57 | 57 | ]; |
| 58 | 58 | |
| 59 | - public function managers() // phpcs:ignore |
|
| 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 | - public function department_translations() // phpcs:ignore |
|
| 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 | - public function job_posters() // phpcs:ignore |
|
| 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 | /** |
@@ -76,13 +76,13 @@ discard block |
||
| 76 | 76 | * |
| 77 | 77 | * @return mixed[] |
| 78 | 78 | */ |
| 79 | - public function toApiArray() |
|
| 79 | + public function toApiArray () |
|
| 80 | 80 | { |
| 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; |
@@ -28,8 +28,8 @@ |
||
| 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 | } |
@@ -28,8 +28,8 @@ |
||
| 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 | } |
@@ -32,13 +32,13 @@ |
||
| 32 | 32 | public $translatedAttributes = ['value']; |
| 33 | 33 | protected $fillable = []; |
| 34 | 34 | |
| 35 | - public function job_posters() //phpcs:ignore |
|
| 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 | - public function security_clearance_translations() //phpcs:ignore |
|
| 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 | } |