@@ -34,9 +34,9 @@ discard block |
||
| 34 | 34 | * |
| 35 | 35 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
| 36 | 36 | */ |
| 37 | - public function job_poster(): \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 37 | + public function job_poster (): \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 38 | 38 | { |
| 39 | - return $this->belongsTo(\App\Models\JobPoster::class); |
|
| 39 | + return $this->belongsTo (\App\Models\JobPoster::class); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -44,9 +44,9 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
| 46 | 46 | */ |
| 47 | - public function assessment_type(): \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 47 | + public function assessment_type (): \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 48 | 48 | { |
| 49 | - return $this->belongsTo(\App\Models\Lookup\AssessmentType::class); |
|
| 49 | + return $this->belongsTo (\App\Models\Lookup\AssessmentType::class); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -54,8 +54,8 @@ discard block |
||
| 54 | 54 | * |
| 55 | 55 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
| 56 | 56 | */ |
| 57 | - public function rating_guide_answers(): \Illuminate\Database\Eloquent\Relations\HasMany |
|
| 57 | + public function rating_guide_answers (): \Illuminate\Database\Eloquent\Relations\HasMany |
|
| 58 | 58 | { |
| 59 | - return $this->hasMany(\App\Models\RatingGuideAnswer::class); |
|
| 59 | + return $this->hasMany (\App\Models\RatingGuideAnswer::class); |
|
| 60 | 60 | } |
| 61 | 61 | } |
@@ -35,8 +35,8 @@ |
||
| 35 | 35 | 'how_we_work' |
| 36 | 36 | ]; |
| 37 | 37 | |
| 38 | - public function team_culture() //phpcs:ignore |
|
| 38 | + public function team_culture () //phpcs:ignore |
|
| 39 | 39 | { |
| 40 | - return $this->belongsTo(\App\Models\TeamCulture::class); |
|
| 40 | + return $this->belongsTo (\App\Models\TeamCulture::class); |
|
| 41 | 41 | } |
| 42 | 42 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * |
| 18 | 18 | * @return Date |
| 19 | 19 | */ |
| 20 | - public function freshTimestamp() |
|
| 20 | + public function freshTimestamp () |
|
| 21 | 21 | { |
| 22 | 22 | return new Date; |
| 23 | 23 | } |
@@ -28,15 +28,15 @@ discard block |
||
| 28 | 28 | * @param mixed $value |
| 29 | 29 | * @return Date |
| 30 | 30 | */ |
| 31 | - protected function asDateTime($value) |
|
| 31 | + protected function asDateTime ($value) |
|
| 32 | 32 | { |
| 33 | - $timezone = Config::get('app.timezone'); |
|
| 33 | + $timezone = Config::get ('app.timezone'); |
|
| 34 | 34 | |
| 35 | 35 | // If this value is already a Carbon instance, we shall just return it as is. |
| 36 | 36 | // This prevents us having to re-instantiate a Carbon instance when we know |
| 37 | 37 | // it already is one, which wouldn't be fulfilled by the DateTime check. |
| 38 | 38 | if ($value instanceof Carbon) { |
| 39 | - return Date::parse($value, $timezone); |
|
| 39 | + return Date::parse ($value, $timezone); |
|
| 40 | 40 | } |
| 41 | 41 | if ($value instanceof Date) { |
| 42 | 42 | return $value; |
@@ -45,35 +45,35 @@ discard block |
||
| 45 | 45 | // these checks since they will be a waste of time, and hinder performance |
| 46 | 46 | // when checking the field. We will just return the DateTime right away. |
| 47 | 47 | if ($value instanceof DateTimeInterface) { |
| 48 | - return new Date( |
|
| 48 | + return new Date ( |
|
| 49 | 49 | //$value->format('Y-m-d H:i:s.u'), $value->getTimeZone() |
| 50 | - $value->format('Y-m-d H:i:s.u'), $timezone |
|
| 50 | + $value->format ('Y-m-d H:i:s.u'), $timezone |
|
| 51 | 51 | ); |
| 52 | 52 | } |
| 53 | 53 | // If this value is an integer, we will assume it is a UNIX timestamp's value |
| 54 | 54 | // and format a Carbon object from this timestamp. This allows flexibility |
| 55 | 55 | // when defining your date fields as they might be UNIX timestamps here. |
| 56 | - if (is_numeric($value)) { |
|
| 57 | - return Date::createFromTimestamp($value, $timezone); |
|
| 56 | + if (is_numeric ($value)) { |
|
| 57 | + return Date::createFromTimestamp ($value, $timezone); |
|
| 58 | 58 | } |
| 59 | 59 | // If the value is in simply year, month, day format, we will instantiate the |
| 60 | 60 | // Carbon instances from that format. Again, this provides for simple date |
| 61 | 61 | // fields on the database, while still supporting Carbonized conversion. |
| 62 | - if (preg_match('/^(\d{4})-(\d{1,2})-(\d{1,2})$/', $value)) { |
|
| 63 | - return Date::createFromFormat('Y-m-d', $value, $timezone)->startOfDay(); |
|
| 62 | + if (preg_match ('/^(\d{4})-(\d{1,2})-(\d{1,2})$/', $value)) { |
|
| 63 | + return Date::createFromFormat ('Y-m-d', $value, $timezone)->startOfDay (); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | // If the date follows the api configured date format, use that. |
| 67 | - $apiFormat = Config::get('app.api_datetime_format'); |
|
| 68 | - $date = DateTime::createFromFormat($apiFormat, $value); |
|
| 69 | - if ($date && $date->format($apiFormat) == $value) { |
|
| 67 | + $apiFormat = Config::get ('app.api_datetime_format'); |
|
| 68 | + $date = DateTime::createFromFormat ($apiFormat, $value); |
|
| 69 | + if ($date && $date->format ($apiFormat) == $value) { |
|
| 70 | 70 | return $date; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | // Finally, we will just assume this date is in the format used by default on |
| 74 | 74 | // the database connection and use that format to create the Carbon object |
| 75 | 75 | // that is returned back out to the developers after we convert it here. |
| 76 | - return Date::createFromFormat($this->getDateFormat(), $value, $timezone); |
|
| 76 | + return Date::createFromFormat ($this->getDateFormat (), $value, $timezone); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | * @param DateTimeInterface $date |
| 83 | 83 | * @return void |
| 84 | 84 | */ |
| 85 | - protected function serializeDate(DateTimeInterface $date) |
|
| 85 | + protected function serializeDate (DateTimeInterface $date) |
|
| 86 | 86 | { |
| 87 | - return $date->format(Config::get('app.api_datetime_format')); |
|
| 87 | + return $date->format (Config::get ('app.api_datetime_format')); |
|
| 88 | 88 | } |
| 89 | 89 | } |
@@ -34,8 +34,8 @@ |
||
| 34 | 34 | 'specificity' |
| 35 | 35 | ]; |
| 36 | 36 | |
| 37 | - public function criteria() |
|
| 37 | + public function criteria () |
|
| 38 | 38 | { |
| 39 | - return $this->belongsTo(\App\Models\Lookup\Criteria::class); |
|
| 39 | + return $this->belongsTo (\App\Models\Lookup\Criteria::class); |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -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 | } |
@@ -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; |