@@ -53,11 +53,11 @@ |
||
53 | 53 | |
54 | 54 | public function degree_type() |
55 | 55 | { |
56 | - return $this->belongsTo(\App\Models\Lookup\DegreeType::class); |
|
56 | + return $this->belongsTo (\App\Models\Lookup\DegreeType::class); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | public function applicant() |
60 | 60 | { |
61 | - return $this->belongsTo(\App\Models\Applicant::class); |
|
61 | + return $this->belongsTo (\App\Models\Applicant::class); |
|
62 | 62 | } |
63 | 63 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function rating_guide_question(): \Illuminate\Database\Eloquent\Relations\BelongsTo |
52 | 52 | { |
53 | - return $this->belongsTo(\App\Models\RatingGuideQuestion::class); |
|
53 | + return $this->belongsTo (\App\Models\RatingGuideQuestion::class); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -60,6 +60,6 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function criterion(): \Illuminate\Database\Eloquent\Relations\BelongsTo |
62 | 62 | { |
63 | - return $this->belongsTo(\App\Models\Criteria::class, 'criterion_id'); |
|
63 | + return $this->belongsTo (\App\Models\Criteria::class, 'criterion_id'); |
|
64 | 64 | } |
65 | 65 | } |
@@ -50,6 +50,6 @@ |
||
50 | 50 | |
51 | 51 | public function manager() |
52 | 52 | { |
53 | - return $this->belongsTo(\App\Models\Manager::class); |
|
53 | + return $this->belongsTo (\App\Models\Manager::class); |
|
54 | 54 | } |
55 | 55 | } |
@@ -42,6 +42,6 @@ |
||
42 | 42 | */ |
43 | 43 | public function job_poster() |
44 | 44 | { |
45 | - return $this->belongsTo(\App\Models\JobPoster::class); |
|
45 | + return $this->belongsTo (\App\Models\JobPoster::class); |
|
46 | 46 | } |
47 | 47 | } |
@@ -44,21 +44,21 @@ |
||
44 | 44 | |
45 | 45 | public function manager() |
46 | 46 | { |
47 | - return $this->belongsTo(\App\Models\Manager::class); |
|
47 | + return $this->belongsTo (\App\Models\Manager::class); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | public function telework_allowed_frequency() //phpcs:ignore |
51 | 51 | { |
52 | - return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
52 | + return $this->belongsTo (\App\Models\Lookup\Frequency::class); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | public function flexible_hours_frequency() //phpcs:ignore |
56 | 56 | { |
57 | - return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
57 | + return $this->belongsTo (\App\Models\Lookup\Frequency::class); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | public function workplace_photo_captions() //phpcs:ignore |
61 | 61 | { |
62 | - return $this->hasMany(\App\Models\WorkplacePhotoCaption::class); |
|
62 | + return $this->hasMany (\App\Models\WorkplacePhotoCaption::class); |
|
63 | 63 | } |
64 | 64 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 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 | /** |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 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 | /** |
@@ -56,6 +56,6 @@ discard block |
||
56 | 56 | */ |
57 | 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 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 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 | /** |
@@ -35,6 +35,6 @@ |
||
35 | 35 | |
36 | 36 | public function job_poster() //phpcs:ignore |
37 | 37 | { |
38 | - return $this->belongsTo(\App\Models\JobPoster::class); |
|
38 | + return $this->belongsTo (\App\Models\JobPoster::class); |
|
39 | 39 | } |
40 | 40 | } |
@@ -289,77 +289,77 @@ discard block |
||
289 | 289 | // @codeCoverageIgnoreStart |
290 | 290 | public function department() // phpcs:ignore |
291 | 291 | { |
292 | - return $this->belongsTo(\App\Models\Lookup\Department::class); |
|
292 | + return $this->belongsTo (\App\Models\Lookup\Department::class); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | public function job_term() // phpcs:ignore |
296 | 296 | { |
297 | - return $this->belongsTo(\App\Models\Lookup\JobTerm::class); |
|
297 | + return $this->belongsTo (\App\Models\Lookup\JobTerm::class); |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | public function language_requirement() // phpcs:ignore |
301 | 301 | { |
302 | - return $this->belongsTo(\App\Models\Lookup\LanguageRequirement::class); |
|
302 | + return $this->belongsTo (\App\Models\Lookup\LanguageRequirement::class); |
|
303 | 303 | } |
304 | 304 | |
305 | 305 | public function manager() // phpcs:ignore |
306 | 306 | { |
307 | - return $this->belongsTo(\App\Models\Manager::class); |
|
307 | + return $this->belongsTo (\App\Models\Manager::class); |
|
308 | 308 | } |
309 | 309 | |
310 | 310 | public function province() // phpcs:ignore |
311 | 311 | { |
312 | - return $this->belongsTo(\App\Models\Lookup\Province::class); |
|
312 | + return $this->belongsTo (\App\Models\Lookup\Province::class); |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | public function security_clearance() // phpcs:ignore |
316 | 316 | { |
317 | - return $this->belongsTo(\App\Models\Lookup\SecurityClearance::class); |
|
317 | + return $this->belongsTo (\App\Models\Lookup\SecurityClearance::class); |
|
318 | 318 | } |
319 | 319 | |
320 | 320 | public function criteria() // phpcs:ignore |
321 | 321 | { |
322 | - return $this->hasMany(\App\Models\Criteria::class); |
|
322 | + return $this->hasMany (\App\Models\Criteria::class); |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | public function job_applications() // phpcs:ignore |
326 | 326 | { |
327 | - return $this->hasMany(\App\Models\JobApplication::class); |
|
327 | + return $this->hasMany (\App\Models\JobApplication::class); |
|
328 | 328 | } |
329 | 329 | |
330 | 330 | public function job_poster_key_tasks() // phpcs:ignore |
331 | 331 | { |
332 | - return $this->hasMany(\App\Models\JobPosterKeyTask::class); |
|
332 | + return $this->hasMany (\App\Models\JobPosterKeyTask::class); |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | public function job_poster_questions() // phpcs:ignore |
336 | 336 | { |
337 | - return $this->hasMany(\App\Models\JobPosterQuestion::class); |
|
337 | + return $this->hasMany (\App\Models\JobPosterQuestion::class); |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | public function telework_allowed_frequency() // phpcs:ignore |
341 | 341 | { |
342 | - return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
342 | + return $this->belongsTo (\App\Models\Lookup\Frequency::class); |
|
343 | 343 | } |
344 | 344 | |
345 | 345 | public function flexible_hours_frequency() // phpcs:ignore |
346 | 346 | { |
347 | - return $this->belongsTo(\App\Models\Lookup\Frequency::class); |
|
347 | + return $this->belongsTo (\App\Models\Lookup\Frequency::class); |
|
348 | 348 | } |
349 | 349 | |
350 | 350 | public function travel_requirement() // phpcs:ignore |
351 | 351 | { |
352 | - return $this->belongsTo(\App\Models\Lookup\TravelRequirement::class); |
|
352 | + return $this->belongsTo (\App\Models\Lookup\TravelRequirement::class); |
|
353 | 353 | } |
354 | 354 | |
355 | 355 | public function overtime_requirement() // phpcs:ignore |
356 | 356 | { |
357 | - return $this->belongsTo(\App\Models\Lookup\OvertimeRequirement::class); |
|
357 | + return $this->belongsTo (\App\Models\Lookup\OvertimeRequirement::class); |
|
358 | 358 | } |
359 | 359 | |
360 | 360 | public function classification() // phpcs:ignore |
361 | 361 | { |
362 | - return $this->belongsTo(\App\Models\Classification::class); |
|
362 | + return $this->belongsTo (\App\Models\Classification::class); |
|
363 | 363 | } |
364 | 364 | |
365 | 365 | // @codeCoverageIgnoreEnd |
@@ -373,8 +373,8 @@ discard block |
||
373 | 373 | */ |
374 | 374 | public function submitted_applications() // phpcs:ignore |
375 | 375 | { |
376 | - return $this->hasMany(\App\Models\JobApplication::class)->whereDoesntHave('application_status', function ($query): void { |
|
377 | - $query->where('name', 'draft'); |
|
376 | + return $this->hasMany (\App\Models\JobApplication::class)->whereDoesntHave ('application_status', function ($query): void { |
|
377 | + $query->where ('name', 'draft'); |
|
378 | 378 | }); |
379 | 379 | } |
380 | 380 | |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | */ |
394 | 394 | public function resolveRouteBinding($value) // phpcs:ignore |
395 | 395 | { |
396 | - return $this->withCount('submitted_applications')->where('id', $value)->first() ?? abort(404); |
|
396 | + return $this->withCount ('submitted_applications')->where ('id', $value)->first () ?? abort (404); |
|
397 | 397 | } |
398 | 398 | |
399 | 399 | /** |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | public function setPublishedAttribute($value): void |
408 | 408 | { |
409 | 409 | if ($value) { |
410 | - $this->attributes['published_at'] = new Date(); |
|
410 | + $this->attributes['published_at'] = new Date (); |
|
411 | 411 | } else { |
412 | 412 | $this->attributes['published_at'] = null; |
413 | 413 | } |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | |
422 | 422 | public function submitted_applications_count() //phpcs:ignore |
423 | 423 | { |
424 | - return $this->submitted_applications()->count(); |
|
424 | + return $this->submitted_applications ()->count (); |
|
425 | 425 | } |
426 | 426 | |
427 | 427 | /** |
@@ -431,15 +431,15 @@ discard block |
||
431 | 431 | */ |
432 | 432 | public function applyBy(): array |
433 | 433 | { |
434 | - $localCloseDate = new Date($this->close_date_time); // This initializes the date object in UTC time. |
|
435 | - $localCloseDate->setTimezone(new \DateTimeZone(self::TIMEZONE)); // Then set the time zone for display. |
|
434 | + $localCloseDate = new Date ($this->close_date_time); // This initializes the date object in UTC time. |
|
435 | + $localCloseDate->setTimezone (new \DateTimeZone (self::TIMEZONE)); // Then set the time zone for display. |
|
436 | 436 | $displayDate = [ |
437 | - 'date' => $localCloseDate->format(self::DATE_FORMAT[App::getLocale()]), |
|
438 | - 'time' => $localCloseDate->format(self::TIME_FORMAT[App::getLocale()]) |
|
437 | + 'date' => $localCloseDate->format (self::DATE_FORMAT[App::getLocale ()]), |
|
438 | + 'time' => $localCloseDate->format (self::TIME_FORMAT[App::getLocale ()]) |
|
439 | 439 | ]; |
440 | 440 | |
441 | - if (App::isLocale('fr')) { |
|
442 | - $displayDate['time'] = str_replace(['EST', 'EDT'], ['HNE', 'HAE'], $displayDate['time']); |
|
441 | + if (App::isLocale ('fr')) { |
|
442 | + $displayDate['time'] = str_replace (['EST', 'EDT'], ['HNE', 'HAE'], $displayDate['time']); |
|
443 | 443 | } |
444 | 444 | |
445 | 445 | return $displayDate; |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | */ |
454 | 454 | public function displayStatus(): string |
455 | 455 | { |
456 | - return $this->isOpen() ? 'Open' : 'Closed'; |
|
456 | + return $this->isOpen () ? 'Open' : 'Closed'; |
|
457 | 457 | } |
458 | 458 | |
459 | 459 | /** |
@@ -466,8 +466,8 @@ discard block |
||
466 | 466 | return $this->published |
467 | 467 | && $this->open_date_time !== null |
468 | 468 | && $this->close_date_time !== null |
469 | - && $this->open_date_time->isPast() |
|
470 | - && $this->close_date_time->isFuture(); |
|
469 | + && $this->open_date_time->isPast () |
|
470 | + && $this->close_date_time->isFuture (); |
|
471 | 471 | } |
472 | 472 | |
473 | 473 | /** |
@@ -480,8 +480,8 @@ discard block |
||
480 | 480 | return $this->published |
481 | 481 | && $this->open_date_time !== null |
482 | 482 | && $this->close_date_time !== null |
483 | - && $this->open_date_time->isPast() |
|
484 | - && $this->close_date_time->isPast(); |
|
483 | + && $this->open_date_time->isPast () |
|
484 | + && $this->close_date_time->isPast (); |
|
485 | 485 | } |
486 | 486 | |
487 | 487 | /** |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | */ |
492 | 492 | public function timeRemaining(): string |
493 | 493 | { |
494 | - $interval = $this->close_date_time->diff(Date::now()); |
|
494 | + $interval = $this->close_date_time->diff (Date::now ()); |
|
495 | 495 | |
496 | 496 | $d = $interval->d; |
497 | 497 | $h = $interval->h; |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | |
515 | 515 | $key = "common/time.$unit"; |
516 | 516 | |
517 | - return Lang::choice($key, $count); |
|
517 | + return Lang::choice ($key, $count); |
|
518 | 518 | } |
519 | 519 | |
520 | 520 | /** |
@@ -526,9 +526,9 @@ discard block |
||
526 | 526 | public function status(): string |
527 | 527 | { |
528 | 528 | $status = 'draft'; |
529 | - if ($this->isOpen()) { |
|
529 | + if ($this->isOpen ()) { |
|
530 | 530 | $status = 'published'; |
531 | - } elseif ($this->isClosed()) { |
|
531 | + } elseif ($this->isClosed ()) { |
|
532 | 532 | $status = 'closed'; |
533 | 533 | } elseif ($this->review_requested_at !== null) { |
534 | 534 | $status = 'submitted'; |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | public function getClassificationMessageAttribute() |
563 | 563 | { |
564 | 564 | if ($this->classification_id !== null && $this->classification_level !== null) { |
565 | - return $this->classification->key . '-0' . $this->classification_level; |
|
565 | + return $this->classification->key.'-0'.$this->classification_level; |
|
566 | 566 | } |
567 | 567 | return null; |
568 | 568 | } |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | */ |
576 | 576 | public function toApiArray(): array |
577 | 577 | { |
578 | - $jobWithTranslations = array_merge($this->toArray(), $this->getTranslations()); |
|
578 | + $jobWithTranslations = array_merge ($this->toArray (), $this->getTranslations ()); |
|
579 | 579 | return $jobWithTranslations; |
580 | 580 | } |
581 | 581 | } |