@@ -19,8 +19,8 @@ discard block |
||
19 | 19 | //$answer = RatingGuideAnswer::find($this->route()->originalParameter('ratingGuideAnswer')); |
20 | 20 | |
21 | 21 | // The id parameter in the route is typehinted to magically become a RatingGuideAnswer object. |
22 | - $answer = $this->route('ratingGuideAnswer'); |
|
23 | - return $answer && $this->user()->can('update', $answer); |
|
22 | + $answer = $this->route ('ratingGuideAnswer'); |
|
23 | + return $answer && $this->user ()->can ('update', $answer); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | return [ |
34 | 34 | // RatingGuideQUestionId shouldn't be updated after creation |
35 | 35 | //'rating_guide_question_id' => ['required', new RatingGuideQuestionRule()], |
36 | - 'criterion_id' => ['nullable', new ValidIdRule(Criteria::class)], |
|
36 | + 'criterion_id' => ['nullable', new ValidIdRule (Criteria::class)], |
|
37 | 37 | 'expected_answer' => 'nullable|string', |
38 | 38 | ]; |
39 | 39 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | public function authorize() : bool |
15 | 15 | { |
16 | 16 | // Only allow updates if the user is a logged in Admin. |
17 | - return backpack_auth()->check(); |
|
17 | + return backpack_auth ()->check (); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function rules() : array |
26 | 26 | { |
27 | 27 | return [ |
28 | - 'name' => 'required|unique_translation:skills,name' . (isset($this->id) ? ",{$this->id}" : ''), |
|
28 | + 'name' => 'required|unique_translation:skills,name'.(isset($this->id) ? ",{$this->id}" : ''), |
|
29 | 29 | 'description' => 'required', |
30 | 30 | 'skill_type_id' => 'exists:skill_types,id' |
31 | 31 | ]; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function authorize(): bool |
26 | 26 | { |
27 | - $job = $this->route('job'); |
|
27 | + $job = $this->route ('job'); |
|
28 | 28 | // Published jobs cannot be updated. |
29 | 29 | return $job && $job->published_at === null; |
30 | 30 | } |
@@ -36,23 +36,23 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function rules(): array |
38 | 38 | { |
39 | - $dateFormat = Config::get('app.api_datetime_format'); |
|
39 | + $dateFormat = Config::get ('app.api_datetime_format'); |
|
40 | 40 | $dateFormatRule = "date_format:$dateFormat"; |
41 | 41 | $sliderRule = 'between:1,4'; |
42 | 42 | return [ |
43 | - 'chosen_lang' => ['nullable', Rule::in(['en', 'fr'])], |
|
43 | + 'chosen_lang' => ['nullable', Rule::in (['en', 'fr'])], |
|
44 | 44 | 'term_qty' => 'nullable|numeric', |
45 | 45 | 'open_date_time' =>['nullable', $dateFormatRule], |
46 | 46 | 'close_date_time' => ['nullable', $dateFormatRule], |
47 | 47 | 'start_date_time' =>['nullable', $dateFormatRule], |
48 | - 'department_id' => ['nullable', new ValidIdRule(Department::class)], |
|
49 | - 'province_id' => ['nullable', new ValidIdRule(Province::class)], |
|
50 | - 'security_clearance_id' => ['nullable', new ValidIdRule(SecurityClearance::class)], |
|
51 | - 'language_requirement_id' => ['nullable', new ValidIdRule(LanguageRequirement::class)], |
|
48 | + 'department_id' => ['nullable', new ValidIdRule (Department::class)], |
|
49 | + 'province_id' => ['nullable', new ValidIdRule (Province::class)], |
|
50 | + 'security_clearance_id' => ['nullable', new ValidIdRule (SecurityClearance::class)], |
|
51 | + 'language_requirement_id' => ['nullable', new ValidIdRule (LanguageRequirement::class)], |
|
52 | 52 | 'salary_min' => 'nullable|numeric', |
53 | 53 | 'salary_max' => 'nullable|numeric', |
54 | 54 | 'noc' => 'nullable|numeric', |
55 | - 'classification_id' => ['nullable', new ValidIdRule(Classification::class)], |
|
55 | + 'classification_id' => ['nullable', new ValidIdRule (Classification::class)], |
|
56 | 56 | 'classification_level' => 'nullable|numeric', |
57 | 57 | 'remote_work_allowed' => 'nullable|boolean', |
58 | 58 | 'team_size' => 'nullable|numeric', |
@@ -63,10 +63,10 @@ discard block |
||
63 | 63 | 'experimental_vs_ongoing' => ['nullable', $sliderRule], |
64 | 64 | 'citizen_facing_vs_back_office' => ['nullable', $sliderRule], |
65 | 65 | 'collaborative_vs_independent' => ['nullable', $sliderRule], |
66 | - 'telework_allowed_frequency_id' => ['nullable', new ValidIdRule(Frequency::class)], |
|
67 | - 'flexible_hours_frequency_id' => ['nullable', new ValidIdRule(Frequency::class)], |
|
68 | - 'travel_requirement_id' => ['nullable', new ValidIdRule(TravelRequirement::class)], |
|
69 | - 'overtime_requirement_id' => ['nullable', new ValidIdRule(OvertimeRequirement::class)], |
|
66 | + 'telework_allowed_frequency_id' => ['nullable', new ValidIdRule (Frequency::class)], |
|
67 | + 'flexible_hours_frequency_id' => ['nullable', new ValidIdRule (Frequency::class)], |
|
68 | + 'travel_requirement_id' => ['nullable', new ValidIdRule (TravelRequirement::class)], |
|
69 | + 'overtime_requirement_id' => ['nullable', new ValidIdRule (OvertimeRequirement::class)], |
|
70 | 70 | 'city.en' => 'nullable|string', |
71 | 71 | 'city.fr' => 'nullable|string', |
72 | 72 | 'title.en' => 'nullable|string', |
@@ -14,6 +14,6 @@ |
||
14 | 14 | public function authorize(): bool |
15 | 15 | { |
16 | 16 | // The STORE job poster method requires the user's manager id. |
17 | - return $this->user()->manager !== null; |
|
17 | + return $this->user ()->manager !== null; |
|
18 | 18 | } |
19 | 19 | } |
@@ -28,9 +28,9 @@ |
||
28 | 28 | */ |
29 | 29 | public function rules() |
30 | 30 | { |
31 | - $frequencyRule = new ValidIdRule(Frequency::class); |
|
31 | + $frequencyRule = new ValidIdRule (Frequency::class); |
|
32 | 32 | return [ |
33 | - 'department_id' => ['nullable', new ValidIdRule(Department::class)], |
|
33 | + 'department_id' => ['nullable', new ValidIdRule (Department::class)], |
|
34 | 34 | 'gov_email' => [ |
35 | 35 | 'nullable', |
36 | 36 | 'string', |
@@ -14,6 +14,6 @@ |
||
14 | 14 | */ |
15 | 15 | public function toArray($request) |
16 | 16 | { |
17 | - return parent::toArray($request); |
|
17 | + return parent::toArray ($request); |
|
18 | 18 | } |
19 | 19 | } |
@@ -16,8 +16,8 @@ |
||
16 | 16 | */ |
17 | 17 | public function handle($request, Closure $next) |
18 | 18 | { |
19 | - Date::setLocale(app()->getLocale()); |
|
19 | + Date::setLocale (app ()->getLocale ()); |
|
20 | 20 | |
21 | - return $next($request); |
|
21 | + return $next ($request); |
|
22 | 22 | } |
23 | 23 | } |
@@ -21,41 +21,41 @@ |
||
21 | 21 | */ |
22 | 22 | public function handle($request, Closure $next) |
23 | 23 | { |
24 | - if (Auth::check()) { |
|
25 | - $user = Auth::user(); |
|
24 | + if (Auth::check ()) { |
|
25 | + $user = Auth::user (); |
|
26 | 26 | |
27 | 27 | // If running in a local environment, and FORCE_ADMIN is true, |
28 | 28 | // automatically set any logged in user to (temporarilly) be an admin |
29 | - if (App::environment() == 'local' && Config::get('app.force_admin')) { |
|
30 | - $user->setRole('admin'); |
|
31 | - $user->save(); |
|
29 | + if (App::environment () == 'local' && Config::get ('app.force_admin')) { |
|
30 | + $user->setRole ('admin'); |
|
31 | + $user->save (); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | // Ensure the user has a proper profile associated with it |
35 | 35 | // If no profile exists yet create one. |
36 | 36 | // Admins should be given an applicant and manager profile |
37 | - if ($user->isApplicant() || |
|
38 | - $user->isAdmin() ) { |
|
37 | + if ($user->isApplicant () || |
|
38 | + $user->isAdmin ()) { |
|
39 | 39 | $applicantProfile = $user->applicant; |
40 | 40 | if ($applicantProfile === null) { |
41 | - $applicantProfile = new Applicant(); |
|
41 | + $applicantProfile = new Applicant (); |
|
42 | 42 | $applicantProfile->user_id = $user->id; |
43 | - $applicantProfile->save(); |
|
44 | - $user->refresh(); |
|
43 | + $applicantProfile->save (); |
|
44 | + $user->refresh (); |
|
45 | 45 | } |
46 | 46 | } |
47 | - if ($user->isManager() || |
|
48 | - $user->isAdmin()) { |
|
47 | + if ($user->isManager () || |
|
48 | + $user->isAdmin ()) { |
|
49 | 49 | $managerProfile = $user->manager; |
50 | 50 | if ($managerProfile === null) { |
51 | - $managerProfile = new Manager(); |
|
51 | + $managerProfile = new Manager (); |
|
52 | 52 | $managerProfile->user_id = $user->id; |
53 | - $managerProfile->save(); |
|
54 | - $user->refresh(); |
|
53 | + $managerProfile->save (); |
|
54 | + $user->refresh (); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
59 | - return $next($request); |
|
59 | + return $next ($request); |
|
60 | 60 | } |
61 | 61 | } |
@@ -14,13 +14,13 @@ |
||
14 | 14 | */ |
15 | 15 | public function handle($request, Closure $next) |
16 | 16 | { |
17 | - $user = $request->user(); |
|
17 | + $user = $request->user (); |
|
18 | 18 | |
19 | - if ($user !== null && $user->isManager() && !$user->isGovIdentityConfirmed()) { |
|
20 | - $request->session()->put('url.expected', $request->url()); |
|
21 | - return redirect(route('manager.first_visit')); |
|
19 | + if ($user !== null && $user->isManager () && !$user->isGovIdentityConfirmed ()) { |
|
20 | + $request->session ()->put ('url.expected', $request->url ()); |
|
21 | + return redirect (route ('manager.first_visit')); |
|
22 | 22 | } |
23 | 23 | |
24 | - return $next($request); |
|
24 | + return $next ($request); |
|
25 | 25 | } |
26 | 26 | } |