@@ -13,7 +13,7 @@ |
||
13 | 13 | public function getFunctions(): array |
14 | 14 | { |
15 | 15 | return [ |
16 | - new Twig_SimpleFunction('handleNullState', [$this, 'handleNullState']), |
|
16 | + new Twig_SimpleFunction('handleNullState', [$this, 'handleNullState']), |
|
17 | 17 | ]; |
18 | 18 | } |
19 | 19 |
@@ -28,8 +28,8 @@ |
||
28 | 28 | * @property string $level_description The localized description of the skill level (accounts for skill type). |
29 | 29 | * |
30 | 30 | * Localized Properties: |
31 | - * @property string $description |
|
32 | - * @property string $specificity |
|
31 | + * @property string $description |
|
32 | + * @property string $specificity |
|
33 | 33 | */ |
34 | 34 | class Criteria extends BaseModel |
35 | 35 | { |
@@ -173,10 +173,10 @@ discard block |
||
173 | 173 | } |
174 | 174 | |
175 | 175 | /** |
176 | - * Check if the user has the specified role. |
|
177 | - * @param string $role This may be either 'applicant', 'manager' or 'admin'. |
|
178 | - * @return boolean |
|
179 | - */ |
|
176 | + * Check if the user has the specified role. |
|
177 | + * @param string $role This may be either 'applicant', 'manager' or 'admin'. |
|
178 | + * @return boolean |
|
179 | + */ |
|
180 | 180 | public function hasRole($role) |
181 | 181 | { |
182 | 182 | switch ($role) { |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | * Set this user to the specified role. |
196 | 196 | * |
197 | 197 | * @param string $role Must be either 'applicant', 'manager' or 'admin. |
198 | - * @return void |
|
199 | - */ |
|
198 | + * @return void |
|
199 | + */ |
|
200 | 200 | public function setRole(string $role): void |
201 | 201 | { |
202 | 202 | $this->user_role()->associate(UserRole::where('name', $role)->firstOrFail()); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | * Returns a user's full name. |
232 | 232 | * |
233 | 233 | * @return string |
234 | - */ |
|
234 | + */ |
|
235 | 235 | public function getFullNameAttribute(): string |
236 | 236 | { |
237 | 237 | return $this->first_name . ' ' . $this->last_name; |
@@ -12,8 +12,8 @@ |
||
12 | 12 | public function before($user, $ability) |
13 | 13 | { |
14 | 14 | if ($user->isAdmin()) { |
15 | - $userText = '{id='.$user->id.'}'; |
|
16 | - Log::notice('User '.$userText.' has bypassed policy as an Admin'); |
|
15 | + $userText = '{id=' . $user->id . '}'; |
|
16 | + Log::notice('User ' . $userText . ' has bypassed policy as an Admin'); |
|
17 | 17 | return true; |
18 | 18 | } |
19 | 19 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $authManager = ($user->isManager() && |
26 | 26 | $jobApplication->job_poster->manager->user->is($user)); |
27 | 27 | |
28 | - return $authApplicant||$authManager; |
|
28 | + return $authApplicant || $authManager; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -480,7 +480,7 @@ |
||
480 | 480 | ->middleware('can:update,jobPoster'); |
481 | 481 | |
482 | 482 | |
483 | - Route::get('jobs/{jobPoster}/criteria', 'Api\CriteriaController@indexByJob') |
|
483 | + Route::get('jobs/{jobPoster}/criteria', 'Api\CriteriaController@indexByJob') |
|
484 | 484 | ->where('jobPoster', '[0-9]+') |
485 | 485 | ->middleware('can:view,jobPoster'); |
486 | 486 | Route::put('jobs/{jobPoster}/criteria', 'Api\CriteriaController@batchUpdate') |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | ->name('api.jobs.submit'); |
495 | 495 | Route::resource('jobs', 'Api\JobApiController')->only([ |
496 | 496 | 'show', 'store', 'update' |
497 | - ])->names([ // Specify custom names because default names collied with existing routes. |
|
497 | + ])->names([// Specify custom names because default names collied with existing routes. |
|
498 | 498 | 'show' => 'api.jobs.show', |
499 | 499 | 'store' => 'api.jobs.store', |
500 | 500 | 'update' => 'api.jobs.update' |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | |
503 | 503 | Route::resource('managers', 'Api\ManagerApiController')->only([ |
504 | 504 | 'show', 'update' |
505 | - ])->names([ // Specify custom names because default names collied with existing routes |
|
505 | + ])->names([// Specify custom names because default names collied with existing routes |
|
506 | 506 | 'show' => 'api.managers.show', |
507 | 507 | 'update' => 'api.managers.update' |
508 | 508 | ]); |
@@ -12,11 +12,11 @@ |
||
12 | 12 | class CriteriaController extends Controller |
13 | 13 | { |
14 | 14 | /** |
15 | - * Converts a Criteria to the shape sent and recieved by the api. |
|
16 | - * |
|
17 | - * @param Criteria $model |
|
18 | - * @return void |
|
19 | - */ |
|
15 | + * Converts a Criteria to the shape sent and recieved by the api. |
|
16 | + * |
|
17 | + * @param Criteria $model |
|
18 | + * @return void |
|
19 | + */ |
|
20 | 20 | public function toApiArray(Criteria $model) |
21 | 21 | { |
22 | 22 | return array_merge($model->toArray(), $model->getTranslationsArray()); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | // Ensure the user can make answers, question exists, and user is the owner of the question it answers. |
21 | 21 | if ($this->user()->can('create', RatingGuideAnswer::class)) { |
22 | - $questionId = (int) $this->input('rating_guide_question_id'); |
|
22 | + $questionId = (int)$this->input('rating_guide_question_id'); |
|
23 | 23 | if ($questionId) { |
24 | 24 | $question = RatingGuideQuestion::find($questionId); |
25 | 25 | return $question && $this->user()->can('update', $question); |
@@ -50,8 +50,7 @@ |
||
50 | 50 | |
51 | 51 | // Display slightly different views on different portals. |
52 | 52 | $view = WhichPortal::isManagerPortal() ? |
53 | - 'manager/application_post' : |
|
54 | - 'applicant/application_preview'; |
|
53 | + 'manager/application_post' : 'applicant/application_preview'; |
|
55 | 54 | |
56 | 55 | if (WhichPortal::isManagerPortal()) { |
57 | 56 | // Load things required for review component. |