| @@ -21,8 +21,8 @@ discard block | ||
| 21 | 21 | */ | 
| 22 | 22 | public function indexByJob(JobPoster $jobPoster) | 
| 23 | 23 |      { | 
| 24 | -          $comments = Comment::where('job_poster_id', $jobPoster->id)->get(); | |
| 25 | - return response()->json(new ResourceCollection($comments)); | |
| 24 | +            $comments = Comment::where('job_poster_id', $jobPoster->id)->get(); | |
| 25 | + return response()->json(new ResourceCollection($comments)); | |
| 26 | 26 | } | 
| 27 | 27 | |
| 28 | 28 | /** | 
| @@ -34,12 +34,12 @@ discard block | ||
| 34 | 34 | */ | 
| 35 | 35 | public function store(StoreComment $request, JobPoster $jobPoster) | 
| 36 | 36 |      { | 
| 37 | - $data = $request->validated(); | |
| 38 | - $comment = new Comment(); | |
| 39 | - $comment->user_id = $request->user()->id; | |
| 40 | - $comment->job_poster_id = $jobPoster->id; | |
| 41 | - $comment->fill($data); | |
| 42 | - $comment->save(); | |
| 43 | - return response()->json(new JsonResource($comment)); | |
| 37 | + $data = $request->validated(); | |
| 38 | + $comment = new Comment(); | |
| 39 | + $comment->user_id = $request->user()->id; | |
| 40 | + $comment->job_poster_id = $jobPoster->id; | |
| 41 | + $comment->fill($data); | |
| 42 | + $comment->save(); | |
| 43 | + return response()->json(new JsonResource($comment)); | |
| 44 | 44 | } | 
| 45 | 45 | } | 
| @@ -264,10 +264,10 @@ discard block | ||
| 264 | 264 | } | 
| 265 | 265 | |
| 266 | 266 | /** | 
| 267 | - * Check if the user has the specified role. | |
| 268 | - * @param string $role This may be either 'applicant', 'manager', 'hr_advisor' or 'admin'. | |
| 269 | - * @return boolean | |
| 270 | - */ | |
| 267 | + * Check if the user has the specified role. | |
| 268 | + * @param string $role This may be either 'applicant', 'manager', 'hr_advisor' or 'admin'. | |
| 269 | + * @return boolean | |
| 270 | + */ | |
| 271 | 271 | public function hasRole($role) | 
| 272 | 272 |      { | 
| 273 | 273 |          switch ($role) { | 
| @@ -288,8 +288,8 @@ discard block | ||
| 288 | 288 | * Set this user to the specified role. | 
| 289 | 289 | * | 
| 290 | 290 | * @param string $role Must be either 'applicant', 'manager', 'hr_advisor' or 'admin'. | 
| 291 | - * @return void | |
| 292 | - */ | |
| 291 | + * @return void | |
| 292 | + */ | |
| 293 | 293 | public function setRole(string $role): void | 
| 294 | 294 |      { | 
| 295 | 295 |          $this->user_role()->associate(UserRole::where('key', $role)->firstOrFail()); | 
| @@ -81,8 +81,7 @@ discard block | ||
| 81 | 81 | 'orderable' => false, | 
| 82 | 82 |              'function' => function ($entry) { | 
| 83 | 83 | return $entry->isOpen() ? | 
| 84 | - '<span><i class="fa fa-check-circle"></i></span>' : | |
| 85 | - '<span><i class="fa fa-circle"></i></span>'; | |
| 84 | + '<span><i class="fa fa-check-circle"></i></span>' : '<span><i class="fa fa-circle"></i></span>'; | |
| 86 | 85 | } | 
| 87 | 86 | ]); | 
| 88 | 87 | $this->crud->addColumn([ | 
| @@ -92,8 +91,7 @@ discard block | ||
| 92 | 91 | 'orderable' => false, | 
| 93 | 92 |              'function' => function ($entry) { | 
| 94 | 93 | return $entry->isClosed() ? | 
| 95 | - '<span><i class="fa fa-check-circle"></i></span>' : | |
| 96 | - '<span><i class="fa fa-circle"></i></span>'; | |
| 94 | + '<span><i class="fa fa-check-circle"></i></span>' : '<span><i class="fa fa-circle"></i></span>'; | |
| 97 | 95 | } | 
| 98 | 96 | ]); | 
| 99 | 97 | |
| @@ -124,8 +122,7 @@ discard block | ||
| 124 | 122 | 'function' => | 
| 125 | 123 |              function ($entry) { | 
| 126 | 124 | return $entry->submitted_applications_count() > 0 ? | 
| 127 | -                    '<a target="_blank" href="' . route('manager.jobs.applications', $entry->id) . '">' . $entry->submitted_applications_count() . ' (View <i class="fa fa-external-link"></i>)</a>' : | |
| 128 | - $entry->submitted_applications_count(); | |
| 125 | +                    '<a target="_blank" href="' . route('manager.jobs.applications', $entry->id) . '">' . $entry->submitted_applications_count() . ' (View <i class="fa fa-external-link"></i>)</a>' : $entry->submitted_applications_count(); | |
| 129 | 126 | } | 
| 130 | 127 | ]); | 
| 131 | 128 | |
| @@ -40,7 +40,7 @@ discard block | ||
| 40 | 40 | 'limit' => 120, | 
| 41 | 41 | ]); | 
| 42 | 42 | |
| 43 | - $this->crud->addField([ // Select | |
| 43 | + $this->crud->addField([// Select | |
| 44 | 44 | 'label' => 'Owner User Role', | 
| 45 | 45 | 'type' => 'select', | 
| 46 | 46 | 'name' => 'owner_user_role_id', // the db column for the foreign key | 
| @@ -50,7 +50,7 @@ discard block | ||
| 50 | 50 | 'attributes' => ['disabled' => 'disabled'] | 
| 51 | 51 | ]); | 
| 52 | 52 | |
| 53 | - $this->crud->addField([ // Select | |
| 53 | + $this->crud->addField([// Select | |
| 54 | 54 | 'label' => 'From Status', | 
| 55 | 55 | 'type' => 'select', | 
| 56 | 56 | 'name' => 'from_job_poster_status_id', // the db column for the foreign key | 
| @@ -60,7 +60,7 @@ discard block | ||
| 60 | 60 | 'attributes' => ['disabled' => 'disabled'] | 
| 61 | 61 | ]); | 
| 62 | 62 | |
| 63 | - $this->crud->addField([ // Select | |
| 63 | + $this->crud->addField([// Select | |
| 64 | 64 | 'label' => 'To Status', | 
| 65 | 65 | 'type' => 'select', | 
| 66 | 66 | 'name' => 'to_job_poster_status_id', // the db column for the foreign key | 
| @@ -74,7 +74,7 @@ | ||
| 74 | 74 | |
| 75 | 75 |          $position = $this->job->getTranslations('title'); | 
| 76 | 76 | $classification = $this->job->getClassificationMessageAttribute(); | 
| 77 | -        $subject = Lang::get('common/notifications/screen_candidates.subject', [ 'position' => $position['en'], 'classification' => $classification ]) . ' / ' . Lang::get('common/notifications/screen_candidates.subject', [ 'position' => $position['fr'], 'classification' => $classification ], 'fr'); | |
| 77 | +        $subject = Lang::get('common/notifications/screen_candidates.subject', ['position' => $position['en'], 'classification' => $classification]) . ' / ' . Lang::get('common/notifications/screen_candidates.subject', ['position' => $position['fr'], 'classification' => $classification], 'fr'); | |
| 78 | 78 | |
| 79 | 79 | return $this->subject($subject) | 
| 80 | 80 | ->cc($hr_advisors_emails) | 
| @@ -47,7 +47,7 @@ | ||
| 47 | 47 |                  $ids = explode(',', $ids); | 
| 48 | 48 |                  if ($ids) { | 
| 49 | 49 |                      array_map(function ($v) { | 
| 50 | - return (int) $v; | |
| 50 | + return (int)$v; | |
| 51 | 51 | }, $ids); | 
| 52 | 52 |                      $users = User::whereIn('id', $ids)->with(['applicant', 'manager', 'hr_advisor'])->get(); | 
| 53 | 53 | } | 
| @@ -12,7 +12,7 @@ | ||
| 12 | 12 | class ApplicationValidator | 
| 13 | 13 |  { | 
| 14 | 14 | |
| 15 | - public $backendRules = [ | |
| 15 | + public $backendRules = [ | |
| 16 | 16 | 'job_poster_id' => 'required', | 
| 17 | 17 | 'application_status_id' => 'required', | 
| 18 | 18 | 'applicant_id' => 'required', | 
| @@ -830,7 +830,7 @@ discard block | ||
| 830 | 830 |          ->name('jobs.setJobStatus'); | 
| 831 | 831 |      Route::resource('jobs', 'Api\JobController')->only([ | 
| 832 | 832 | 'show', 'store', 'update', 'index' | 
| 833 | - ])->names([ // Specify custom names because default names collied with existing routes. | |
| 833 | + ])->names([// Specify custom names because default names collied with existing routes. | |
| 834 | 834 | 'show' => 'jobs.show', | 
| 835 | 835 | 'store' => 'jobs.store', | 
| 836 | 836 | 'update' => 'jobs.update', | 
| @@ -843,7 +843,7 @@ discard block | ||
| 843 | 843 | |
| 844 | 844 |      Route::resource('managers', 'Api\ManagerController')->only([ | 
| 845 | 845 | 'show', 'update' | 
| 846 | - ])->names([ // Specify custom names because default names collied with existing routes. | |
| 846 | + ])->names([// Specify custom names because default names collied with existing routes. | |
| 847 | 847 | 'show' => 'managers.show', | 
| 848 | 848 | 'update' => 'managers.update' | 
| 849 | 849 | ]); | 
| @@ -773,8 +773,8 @@ | ||
| 773 | 773 |                      ->middleware('can:downloadApplicants,jobPoster') | 
| 774 | 774 |                      ->name('admin.jobs.download.applicants'); | 
| 775 | 775 | |
| 776 | - /* View Applicant Profile */ | |
| 777 | -                 Route::get('applicants/{applicant}', 'ApplicantProfileController@profile') | |
| 776 | + /* View Applicant Profile */ | |
| 777 | +                    Route::get('applicants/{applicant}', 'ApplicantProfileController@profile') | |
| 778 | 778 |                      ->middleware('can:view,applicant') | 
| 779 | 779 |                      ->name('admin.applicants.profile'); | 
| 780 | 780 | } | 
| @@ -947,7 +947,7 @@ | ||
| 947 | 947 | * @param \App\Models\JobPoster $jobPoster Incoming Job Poster object. | 
| 948 | 948 | * @param string $application_step Current step in application. | 
| 949 | 949 | * @return array | 
| 950 | - */ | |
| 950 | + */ | |
| 951 | 951 | public function customBreadcrumbs(JobPoster $jobPoster, string $application_step) | 
| 952 | 952 |      { | 
| 953 | 953 |          $step_lang = Lang::get('applicant/application_template.tracker_label'); |