| @@ -263,10 +263,10 @@ discard block | ||
| 263 | 263 | } | 
| 264 | 264 | |
| 265 | 265 | /** | 
| 266 | - * Check if the user has the specified role. | |
| 267 | - * @param string $role This may be either 'applicant', 'manager', 'hr_advisor' or 'admin'. | |
| 268 | - * @return boolean | |
| 269 | - */ | |
| 266 | + * Check if the user has the specified role. | |
| 267 | + * @param string $role This may be either 'applicant', 'manager', 'hr_advisor' or 'admin'. | |
| 268 | + * @return boolean | |
| 269 | + */ | |
| 270 | 270 | public function hasRole($role) | 
| 271 | 271 |      { | 
| 272 | 272 |          switch ($role) { | 
| @@ -287,8 +287,8 @@ discard block | ||
| 287 | 287 | * Set this user to the specified role. | 
| 288 | 288 | * | 
| 289 | 289 | * @param string $role Must be either 'applicant', 'manager', 'hr_advisor' or 'admin'. | 
| 290 | - * @return void | |
| 291 | - */ | |
| 290 | + * @return void | |
| 291 | + */ | |
| 292 | 292 | public function setRole(string $role): void | 
| 293 | 293 |      { | 
| 294 | 294 |          $this->user_role()->associate(UserRole::where('name', $role)->firstOrFail()); | 
| @@ -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 | } |