@@ -17,12 +17,12 @@ discard block |
||
17 | 17 | public function index(Request $request) |
18 | 18 | { |
19 | 19 | $notificationsArray = []; |
20 | - if ($request->has('job_poster_id') && $request->user() != null) { |
|
21 | - $jobPosterId = $request->input('job_poster_id'); |
|
22 | - $notifications = AssessmentPlanNotification::where('job_poster_id', $jobPosterId)->get(); |
|
20 | + if ($request->has ('job_poster_id') && $request->user () != null) { |
|
21 | + $jobPosterId = $request->input ('job_poster_id'); |
|
22 | + $notifications = AssessmentPlanNotification::where ('job_poster_id', $jobPosterId)->get (); |
|
23 | 23 | foreach ($notifications as $notification) { |
24 | - if ($request->user()->can('view', $notification)) { |
|
25 | - $notificationsArray[] = $notification->toArray(); |
|
24 | + if ($request->user ()->can ('view', $notification)) { |
|
25 | + $notificationsArray[] = $notification->toArray (); |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | } |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function show(AssessmentPlanNotification $assessmentPlanNotification) |
39 | 39 | { |
40 | - $this->authorize('view', $assessmentPlanNotification); |
|
41 | - return $assessmentPlanNotification->toArray(); |
|
40 | + $this->authorize ('view', $assessmentPlanNotification); |
|
41 | + return $assessmentPlanNotification->toArray (); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -51,15 +51,15 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function update(Request $request, AssessmentPlanNotification $assessmentPlanNotification) |
53 | 53 | { |
54 | - $this->authorize('update', $assessmentPlanNotification); |
|
55 | - $assessmentPlanNotification->fill([ |
|
56 | - 'acknowledged' => $request->input('acknowledged') |
|
54 | + $this->authorize ('update', $assessmentPlanNotification); |
|
55 | + $assessmentPlanNotification->fill ([ |
|
56 | + 'acknowledged' => $request->input ('acknowledged') |
|
57 | 57 | ]); |
58 | - $assessmentPlanNotification->save(); |
|
58 | + $assessmentPlanNotification->save (); |
|
59 | 59 | |
60 | 60 | return [ |
61 | 61 | 'success' => "Successfully updated assessment plan notification $assessmentPlanNotification->id", |
62 | - 'assessment_plan_notification' => $assessmentPlanNotification->toArray(), |
|
62 | + 'assessment_plan_notification' => $assessmentPlanNotification->toArray (), |
|
63 | 63 | ]; |
64 | 64 | } |
65 | 65 | |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function destroy(AssessmentPlanNotification $assessmentPlanNotification) |
73 | 73 | { |
74 | - $this->authorize('delete', $assessmentPlanNotification); |
|
75 | - $assessmentPlanNotification->delete(); |
|
74 | + $this->authorize ('delete', $assessmentPlanNotification); |
|
75 | + $assessmentPlanNotification->delete (); |
|
76 | 76 | |
77 | 77 | return [ |
78 | 78 | 'success' => "Successfully deleted assessment plan notification $assessmentPlanNotification->id" |
@@ -14,10 +14,10 @@ |
||
14 | 14 | */ |
15 | 15 | public function show() |
16 | 16 | { |
17 | - return view( |
|
17 | + return view ( |
|
18 | 18 | 'manager/job-builder-root' |
19 | - )->with([ |
|
20 | - 'title' => Lang::get('manager/job_builder.title'), |
|
19 | + )->with ([ |
|
20 | + 'title' => Lang::get ('manager/job_builder.title'), |
|
21 | 21 | ]); |
22 | 22 | } |
23 | 23 | } |
@@ -16,15 +16,15 @@ |
||
16 | 16 | */ |
17 | 17 | public function destroy(Request $request, WorkExperience $workExperience) |
18 | 18 | { |
19 | - $this->authorize('delete', $workExperience); |
|
20 | - $workExperience->delete(); |
|
19 | + $this->authorize ('delete', $workExperience); |
|
20 | + $workExperience->delete (); |
|
21 | 21 | |
22 | - if ($request->ajax()) { |
|
22 | + if ($request->ajax ()) { |
|
23 | 23 | return [ |
24 | 24 | 'message' => 'Work Experience delete', |
25 | 25 | ]; |
26 | 26 | } |
27 | 27 | |
28 | - return back(); |
|
28 | + return back (); |
|
29 | 29 | } |
30 | 30 | } |
@@ -15,27 +15,27 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function applicant() |
17 | 17 | { |
18 | - $now = Carbon::now(); |
|
18 | + $now = Carbon::now (); |
|
19 | 19 | |
20 | 20 | // Find three most recent published jobs that are currently open for applications. |
21 | 21 | // Eager load required relationships: Department, Province, JobTerm. |
22 | - $jobs = JobPoster::where('open_date_time', '<=', $now) |
|
23 | - ->where('close_date_time', '>=', $now) |
|
24 | - ->where('published', true) |
|
25 | - ->with([ |
|
22 | + $jobs = JobPoster::where ('open_date_time', '<=', $now) |
|
23 | + ->where ('close_date_time', '>=', $now) |
|
24 | + ->where ('published', true) |
|
25 | + ->with ([ |
|
26 | 26 | 'department', |
27 | 27 | 'province', |
28 | 28 | ]) |
29 | - ->orderBy('open_date_time', 'desc') |
|
30 | - ->take(3) |
|
31 | - ->get(); |
|
32 | - return view('applicant/home', [ |
|
33 | - 'home' => Lang::get('applicant/home'), |
|
34 | - 'hero' => Lang::get('common/hero'), |
|
35 | - 'job_index' => Lang::get('applicant/job_index'), |
|
36 | - 'job_post' => Lang::get('applicant/job_post'), |
|
29 | + ->orderBy ('open_date_time', 'desc') |
|
30 | + ->take (3) |
|
31 | + ->get (); |
|
32 | + return view ('applicant/home', [ |
|
33 | + 'home' => Lang::get ('applicant/home'), |
|
34 | + 'hero' => Lang::get ('common/hero'), |
|
35 | + 'job_index' => Lang::get ('applicant/job_index'), |
|
36 | + 'job_post' => Lang::get ('applicant/job_post'), |
|
37 | 37 | 'jobs' => $jobs, |
38 | - 'job_count' => count($jobs) |
|
38 | + 'job_count' => count ($jobs) |
|
39 | 39 | ]); |
40 | 40 | } |
41 | 41 | |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function manager() |
47 | 47 | { |
48 | - return view('manager/home', [ |
|
49 | - 'home_l10n' => Lang::get('manager/home'), |
|
48 | + return view ('manager/home', [ |
|
49 | + 'home_l10n' => Lang::get ('manager/home'), |
|
50 | 50 | ]); |
51 | 51 | } |
52 | 52 | } |
@@ -27,20 +27,20 @@ discard block |
||
27 | 27 | |
28 | 28 | public function shiftFirstLevelArrayKeysToBottom(array $nestedArray) |
29 | 29 | { |
30 | - $expandedArray = $this->expandNestedArraysIntoKeyListAndValue($nestedArray); |
|
31 | - $rotatedArray = $this->rotateKeys($expandedArray, 1); |
|
32 | - $mergedArray = $this->mergeExpandedTrees($rotatedArray); |
|
30 | + $expandedArray = $this->expandNestedArraysIntoKeyListAndValue ($nestedArray); |
|
31 | + $rotatedArray = $this->rotateKeys ($expandedArray, 1); |
|
32 | + $mergedArray = $this->mergeExpandedTrees ($rotatedArray); |
|
33 | 33 | return $mergedArray; |
34 | 34 | } |
35 | 35 | |
36 | 36 | protected function addKeyAsFinalIndex($finalKey, $array) |
37 | 37 | { |
38 | - if (!is_array($array)) { |
|
38 | + if (!is_array ($array)) { |
|
39 | 39 | return [$finalKey => $array]; |
40 | 40 | } else { |
41 | 41 | $newArray = []; |
42 | 42 | foreach ($array as $key => $value) { |
43 | - $newArray[$key] = $this->addKeyAsFinalIndex($finalKey, $value); |
|
43 | + $newArray[$key] = $this->addKeyAsFinalIndex ($finalKey, $value); |
|
44 | 44 | } |
45 | 45 | return $newArray; |
46 | 46 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | protected function expandNestedArraysIntoKeyListAndValue($nestedArray) |
50 | 50 | { |
51 | - if (!is_array($nestedArray)) { |
|
51 | + if (!is_array ($nestedArray)) { |
|
52 | 52 | $expandedArray = [ |
53 | 53 | [ |
54 | 54 | 'keys' => [], |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | } else { |
60 | 60 | $expandedArray = []; |
61 | 61 | foreach ($nestedArray as $key => $value) { |
62 | - $subArray = $this->expandNestedArraysIntoKeyListAndValue($value); |
|
62 | + $subArray = $this->expandNestedArraysIntoKeyListAndValue ($value); |
|
63 | 63 | foreach ($subArray as $item) { |
64 | - array_unshift($item['keys'], $key); |
|
64 | + array_unshift ($item['keys'], $key); |
|
65 | 65 | $expandedArray[] = $item; |
66 | 66 | } |
67 | 67 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $mergedArray = []; |
75 | 75 | foreach ($expandedArray as $item) { |
76 | 76 | $tail = &$mergedArray; |
77 | - $size = count($item['keys']); |
|
77 | + $size = count ($item['keys']); |
|
78 | 78 | $i = 0; |
79 | 79 | foreach ($item['keys'] as $key) { |
80 | 80 | $i = ($i + 1); |
@@ -82,17 +82,17 @@ discard block |
||
82 | 82 | if ($i == ($size)) { |
83 | 83 | if (!isset($tail[$key])) { |
84 | 84 | $tail[$key] = $item['value']; |
85 | - } elseif (!is_array($tail[$key])) { |
|
85 | + } elseif (!is_array ($tail[$key])) { |
|
86 | 86 | $value = $tail[$key]; |
87 | 87 | $tail[$key] = [$value, $item['value']]; |
88 | 88 | } else { |
89 | - array_push($tail[$key], $item['value']); |
|
89 | + array_push ($tail[$key], $item['value']); |
|
90 | 90 | } |
91 | 91 | } else { |
92 | 92 | // If this is not the last key, it needs to contain an array. |
93 | 93 | if (!isset($tail[$key])) { |
94 | 94 | $tail[$key] = []; |
95 | - } elseif (!is_array($tail[$key])) { |
|
95 | + } elseif (!is_array ($tail[$key])) { |
|
96 | 96 | $value = $tail[$key]; |
97 | 97 | $tail[$key] = [$value]; |
98 | 98 | } |
@@ -107,8 +107,8 @@ discard block |
||
107 | 107 | { |
108 | 108 | $rotatedArray = []; |
109 | 109 | foreach ($expandedArray as $item) { |
110 | - for ($i=0; $i<$steps; $i++) { |
|
111 | - array_push($item['keys'], array_shift($item['keys'])); |
|
110 | + for ($i = 0; $i < $steps; $i++) { |
|
111 | + array_push ($item['keys'], array_shift ($item['keys'])); |
|
112 | 112 | } |
113 | 113 | $rotatedArray[] = $item; |
114 | 114 | } |
@@ -123,6 +123,6 @@ discard block |
||
123 | 123 | */ |
124 | 124 | protected function formatAjaxResponse(array $content) |
125 | 125 | { |
126 | - return response()->json($content); |
|
126 | + return response ()->json ($content); |
|
127 | 127 | } |
128 | 128 | } |
@@ -14,11 +14,11 @@ |
||
14 | 14 | */ |
15 | 15 | public function __invoke() |
16 | 16 | { |
17 | - return view( |
|
17 | + return view ( |
|
18 | 18 | 'applicant/static_faq', |
19 | 19 | [ |
20 | - 'faq' => Lang::get('applicant/faq'), |
|
21 | - 'breadcrumb_home' => route('home'), |
|
20 | + 'faq' => Lang::get ('applicant/faq'), |
|
21 | + 'breadcrumb_home' => route ('home'), |
|
22 | 22 | 'applicant_sidebar_active' => 'active', |
23 | 23 | ] |
24 | 24 | ); |
@@ -19,29 +19,29 @@ |
||
19 | 19 | */ |
20 | 20 | public function updateForApplication(Request $request, JobApplication $application) |
21 | 21 | { |
22 | - $request->validate([ |
|
22 | + $request->validate ([ |
|
23 | 23 | 'review_status_id' => [ |
24 | 24 | 'nullable', |
25 | - Rule::in(ReviewStatus::all()->pluck('id')->toArray()) |
|
25 | + Rule::in (ReviewStatus::all ()->pluck ('id')->toArray ()) |
|
26 | 26 | ], |
27 | 27 | 'notes' => 'nullable|string' |
28 | 28 | ]); |
29 | 29 | |
30 | 30 | $review = $application->application_review; |
31 | 31 | if ($review === null) { |
32 | - $review = new ApplicationReview(); |
|
33 | - $review->job_application()->associate($application); |
|
32 | + $review = new ApplicationReview (); |
|
33 | + $review->job_application ()->associate ($application); |
|
34 | 34 | } |
35 | - $review->fill([ |
|
36 | - 'review_status_id' => $request->input('review_status_id'), |
|
37 | - 'notes' => $request->input('notes'), |
|
35 | + $review->fill ([ |
|
36 | + 'review_status_id' => $request->input ('review_status_id'), |
|
37 | + 'notes' => $request->input ('notes'), |
|
38 | 38 | ]); |
39 | - $review->save(); |
|
39 | + $review->save (); |
|
40 | 40 | |
41 | - if ($request->ajax()) { |
|
42 | - return $review->fresh()->toJson(); |
|
41 | + if ($request->ajax ()) { |
|
42 | + return $review->fresh ()->toJson (); |
|
43 | 43 | } |
44 | 44 | |
45 | - return redirect()->back(); |
|
45 | + return redirect ()->back (); |
|
46 | 46 | } |
47 | 47 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | protected function redirectTo() |
46 | 46 | { |
47 | - $redirectTo = WhichPortal::isManagerPortal() ? route('manager.home') : route('home'); |
|
47 | + $redirectTo = WhichPortal::isManagerPortal () ? route('manager.home') : route ('home'); |
|
48 | 48 | return $redirectTo; |
49 | 49 | } |
50 | 50 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function __construct() |
57 | 57 | { |
58 | - $this->middleware('guest')->except('logout'); |
|
58 | + $this->middleware ('guest')->except ('logout'); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -66,11 +66,11 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function showLoginForm() |
68 | 68 | { |
69 | - $home_url = WhichPortal::isManagerPortal() ? route('manager.home') : route('home'); |
|
69 | + $home_url = WhichPortal::isManagerPortal () ? route('manager.home') : route ('home'); |
|
70 | 70 | |
71 | - return view('auth/login', [ |
|
72 | - 'routes' => $this->auth_routes(), |
|
73 | - 'login' => Lang::get('common/auth/login'), |
|
71 | + return view ('auth/login', [ |
|
72 | + 'routes' => $this->auth_routes (), |
|
73 | + 'login' => Lang::get ('common/auth/login'), |
|
74 | 74 | 'home_url' => $home_url, |
75 | 75 | ]); |
76 | 76 | } |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function logout(Request $request) |
86 | 86 | { |
87 | - $this->guard()->logout(); |
|
87 | + $this->guard ()->logout (); |
|
88 | 88 | |
89 | - $request->session()->invalidate(); |
|
89 | + $request->session ()->invalidate (); |
|
90 | 90 | |
91 | 91 | // This causes logout to redirect to the same page as login. |
92 | - return redirect($this->redirectPath()); |
|
92 | + return redirect ($this->redirectPath ()); |
|
93 | 93 | } |
94 | 94 | } |
@@ -14,25 +14,25 @@ |
||
14 | 14 | */ |
15 | 15 | protected function auth_routes() |
16 | 16 | { |
17 | - if (WhichPortal::isManagerPortal()) { |
|
17 | + if (WhichPortal::isManagerPortal ()) { |
|
18 | 18 | $routes = [ |
19 | - 'home' => route('manager.home'), |
|
20 | - 'login' => route('manager.login'), |
|
21 | - 'register' => route('manager.register'), |
|
19 | + 'home' => route ('manager.home'), |
|
20 | + 'login' => route ('manager.login'), |
|
21 | + 'register' => route ('manager.register'), |
|
22 | 22 | 'password' => [ |
23 | - 'email' => route('manager.password.email'), |
|
24 | - 'request' => route('manager.password.request'), |
|
23 | + 'email' => route ('manager.password.email'), |
|
24 | + 'request' => route ('manager.password.request'), |
|
25 | 25 | ], |
26 | 26 | // 'passwords.reset' => route('manager.password.reset'), |
27 | 27 | ]; |
28 | 28 | } else { |
29 | 29 | $routes = [ |
30 | - 'home' => route('home'), |
|
31 | - 'login' => route('login'), |
|
32 | - 'register' => route('register'), |
|
30 | + 'home' => route ('home'), |
|
31 | + 'login' => route ('login'), |
|
32 | + 'register' => route ('register'), |
|
33 | 33 | 'password' => [ |
34 | - 'email' => route('password.email'), |
|
35 | - 'request' => route('password.request'), |
|
34 | + 'email' => route ('password.email'), |
|
35 | + 'request' => route ('password.request'), |
|
36 | 36 | ], |
37 | 37 | // 'passwords.reset' => route('password.reset'), |
38 | 38 | ]; |