@@ -29,7 +29,7 @@ |
||
29 | 29 | * Convert a job poster to the array expected by API requests, |
30 | 30 | * with all criteria, |
31 | 31 | * and with translation arrays in both languages. |
32 | - * |
|
32 | + * |
|
33 | 33 | * @param \App\Models\JobPoster $job Incoming Job Poster object. |
34 | 34 | * @return mixed[] |
35 | 35 | */ |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | $criteria = Criteria::where('job_poster_id', $job->id)->get(); |
39 | 39 | |
40 | - $toApiArray = function ($model) { |
|
40 | + $toApiArray = function($model){ |
|
41 | 41 | return array_merge($model->toArray(), $model->getTranslationsArray()); |
42 | 42 | }; |
43 | 43 | $criteriaTranslated = $criteria->map($toApiArray); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | $criteria = Criteria::where('job_poster_id', $job->id)->get(); |
39 | 39 | |
40 | - $toApiArray = function ($model) { |
|
40 | + $toApiArray = function ($model){ |
|
41 | 41 | return array_merge($model->toArray(), $model->getTranslationsArray()); |
42 | 42 | }; |
43 | 43 | $criteriaTranslated = $criteria->map($toApiArray); |
@@ -26,12 +26,12 @@ |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
29 | - * Show the form for editing the applicant's experience |
|
30 | - * |
|
31 | - * @param \Illuminate\Http\Request $request Incoming request object. |
|
32 | - * @param \App\Models\Applicant $applicant Incoming applicant object. |
|
33 | - * @return \Illuminate\Http\Response |
|
34 | - */ |
|
29 | + * Show the form for editing the applicant's experience |
|
30 | + * |
|
31 | + * @param \Illuminate\Http\Request $request Incoming request object. |
|
32 | + * @param \App\Models\Applicant $applicant Incoming applicant object. |
|
33 | + * @return \Illuminate\Http\Response |
|
34 | + */ |
|
35 | 35 | public function edit(Request $request, Applicant $applicant) |
36 | 36 | { |
37 | 37 | return view('applicant/profile_02_experience', [ |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | ]); |
112 | 112 | $degree->save(); |
113 | 113 | } else { |
114 | - Log::warning("Applicant $applicant->id attempted to update degree with invalid id: $id"); |
|
114 | + Log::warning("applicant $applicant->id attempted to update degree with invalid id: $id"); |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | ]); |
169 | 169 | $course->save(); |
170 | 170 | } else { |
171 | - Log::warning("Applicant $applicant->id attempted to update course with invalid id: $id"); |
|
171 | + Log::warning("applicant $applicant->id attempted to update course with invalid id: $id"); |
|
172 | 172 | } |
173 | 173 | } |
174 | 174 | } |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | ]); |
226 | 226 | $workExperience->save(); |
227 | 227 | } else { |
228 | - Log::warning("Applicant $applicant->id attempted to update work_experience with invalid id: $id"); |
|
228 | + Log::warning("applicant $applicant->id attempted to update work_experience with invalid id: $id"); |
|
229 | 229 | } |
230 | 230 | } |
231 | 231 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | // redirect to error messages element if validation fails |
139 | 139 | if (isset($request->validator) && $request->validator->fails()) { |
140 | 140 | $hash = '#managerProfileFormErrors'; |
141 | - return redirect(route('manager.profile.edit', $manager).$hash) |
|
141 | + return redirect(route('manager.profile.edit', $manager) . $hash) |
|
142 | 142 | ->withErrors($request->validator) |
143 | 143 | ->withInput(); |
144 | 144 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | break; |
172 | 172 | } |
173 | 173 | |
174 | - return redirect(route('manager.profile.edit', $manager).$hash); |
|
174 | + return redirect(route('manager.profile.edit', $manager) . $hash); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | public function faq(Request $request) |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | 'description' => $question->description, |
92 | 92 | 'answer' => $answer, |
93 | 93 | 'answer_label' => $profileText['about_section']['answer_label'], |
94 | - 'input_name' => $this->answerFormInputName.'['.$question->id.']' |
|
94 | + 'input_name' => $this->answerFormInputName . '[' . $question->id . ']' |
|
95 | 95 | ]; |
96 | 96 | array_push($profileQuestionForms, $formValues); |
97 | 97 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | )->first(); |
143 | 143 | if ($answer == null) { |
144 | 144 | $answer = new ApplicantProfileAnswer(); |
145 | - $answer->applicant_id =$applicant->id; |
|
145 | + $answer->applicant_id = $applicant->id; |
|
146 | 146 | $answer->applicant_profile_question_id = $question->id; |
147 | 147 | } |
148 | 148 | $answer->answer = $request->input($answerName); |
@@ -126,12 +126,12 @@ |
||
126 | 126 | // TODO: replace route('manager.show',manager.id) in templates with link using slug. |
127 | 127 | $criteria = [ |
128 | 128 | 'essential' => $jobPoster->criteria->filter( |
129 | - function ($value, $key) { |
|
129 | + function($value, $key){ |
|
130 | 130 | return $value->criteria_type->name == 'essential'; |
131 | 131 | } |
132 | 132 | ), |
133 | 133 | 'asset' => $jobPoster->criteria->filter( |
134 | - function ($value, $key) { |
|
134 | + function($value, $key){ |
|
135 | 135 | return $value->criteria_type->name == 'asset'; |
136 | 136 | } |
137 | 137 | ), |
@@ -126,12 +126,12 @@ |
||
126 | 126 | // TODO: replace route('manager.show',manager.id) in templates with link using slug. |
127 | 127 | $criteria = [ |
128 | 128 | 'essential' => $jobPoster->criteria->filter( |
129 | - function ($value, $key) { |
|
129 | + function ($value, $key){ |
|
130 | 130 | return $value->criteria_type->name == 'essential'; |
131 | 131 | } |
132 | 132 | ), |
133 | 133 | 'asset' => $jobPoster->criteria->filter( |
134 | - function ($value, $key) { |
|
134 | + function ($value, $key){ |
|
135 | 135 | return $value->criteria_type->name == 'asset'; |
136 | 136 | } |
137 | 137 | ), |
@@ -27,7 +27,7 @@ |
||
27 | 27 | // Custom strings to display within the backpack UI. |
28 | 28 | $this->crud->setEntityNameStrings('classification', 'classifications'); |
29 | 29 | |
30 | - $this->crud->operation(['create', 'update'], function () { |
|
30 | + $this->crud->operation(['create', 'update'], function(){ |
|
31 | 31 | $this->crud->addField([ |
32 | 32 | 'name' => 'key', |
33 | 33 | 'type' => 'text', |
@@ -27,7 +27,7 @@ |
||
27 | 27 | // Custom strings to display within the backpack UI. |
28 | 28 | $this->crud->setEntityNameStrings('classification', 'classifications'); |
29 | 29 | |
30 | - $this->crud->operation(['create', 'update'], function () { |
|
30 | + $this->crud->operation(['create', 'update'], function (){ |
|
31 | 31 | $this->crud->addField([ |
32 | 32 | 'name' => 'key', |
33 | 33 | 'type' => 'text', |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | // things like Create Skill, Delete Skills, etc. |
34 | 34 | $this->crud->setEntityNameStrings('skill', 'skills'); |
35 | 35 | |
36 | - $this->crud->operation(['create', 'update'], function () { |
|
36 | + $this->crud->operation(['create', 'update'], function(){ |
|
37 | 37 | // Add custom fields to the create/update views. |
38 | 38 | $this->crud->addField([ |
39 | 39 | 'name' => 'name', |
@@ -105,10 +105,10 @@ discard block |
||
105 | 105 | 'name' => 'name', |
106 | 106 | 'type' => 'text', |
107 | 107 | 'label' => 'Name', |
108 | - 'searchLogic' => function ($query, $column, $searchTerm) use ($locale) : void { |
|
108 | + 'searchLogic' => function($query, $column, $searchTerm) use ($locale) : void { |
|
109 | 109 | $query->orWhere('name->' . $locale, 'like', "%$searchTerm%"); |
110 | 110 | }, |
111 | - 'orderLogic' => function ($query, $column, $columnDirection) use ($locale) { |
|
111 | + 'orderLogic' => function($query, $column, $columnDirection) use ($locale) { |
|
112 | 112 | return $query->orderBy('name->' . $locale, $columnDirection)->select('*'); |
113 | 113 | } |
114 | 114 | ]); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | 'name' => 'description', |
118 | 118 | 'type' => 'text', |
119 | 119 | 'label' => 'Description', |
120 | - 'searchLogic' => function ($query, $column, $searchTerm) use ($locale) : void { |
|
120 | + 'searchLogic' => function($query, $column, $searchTerm) use ($locale) : void { |
|
121 | 121 | $query->orWhere('description->' . $locale, 'like', "%$searchTerm%"); |
122 | 122 | }, |
123 | 123 | 'orderable' => false, |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | 'type' => 'text', |
130 | 130 | 'label' => 'Type', |
131 | 131 | 'orderable' => true, |
132 | - 'orderLogic' => function ($query, $column, $columnDirection) use ($locale) { |
|
132 | + 'orderLogic' => function($query, $column, $columnDirection) use ($locale) { |
|
133 | 133 | return $query->orderBy('skill_type_id', $columnDirection)->select('*'); |
134 | 134 | } |
135 | 135 | ]); |
@@ -163,13 +163,13 @@ discard block |
||
163 | 163 | 'key' => 'classifications_filter', |
164 | 164 | 'type' => 'select2_multiple', |
165 | 165 | 'label' => 'Filter by classification' |
166 | - ], function () { |
|
166 | + ], function(){ |
|
167 | 167 | // The options that show up in the select2. |
168 | 168 | return Classification::all()->pluck('key', 'id')->toArray(); |
169 | - }, function ($values) { |
|
169 | + }, function($values){ |
|
170 | 170 | // If the filter is active. |
171 | 171 | foreach (json_decode($values) as $key => $value) { |
172 | - $this->crud->query = $this->crud->query->whereHas('classifications', function ($query) use ($value) { |
|
172 | + $this->crud->query = $this->crud->query->whereHas('classifications', function($query) use ($value) { |
|
173 | 173 | $query->where('id', $value); |
174 | 174 | }); |
175 | 175 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | 'label'=> 'No classification' |
184 | 184 | ], |
185 | 185 | false, |
186 | - function () { |
|
186 | + function(){ |
|
187 | 187 | $this->crud->query = $this->crud->query->doesntHave('classifications'); |
188 | 188 | } |
189 | 189 | ); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | // things like Create Skill, Delete Skills, etc. |
34 | 34 | $this->crud->setEntityNameStrings('skill', 'skills'); |
35 | 35 | |
36 | - $this->crud->operation(['create', 'update'], function () { |
|
36 | + $this->crud->operation(['create', 'update'], function (){ |
|
37 | 37 | // Add custom fields to the create/update views. |
38 | 38 | $this->crud->addField([ |
39 | 39 | 'name' => 'name', |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | 'searchLogic' => function ($query, $column, $searchTerm) use ($locale) : void { |
109 | 109 | $query->orWhere('name->' . $locale, 'like', "%$searchTerm%"); |
110 | 110 | }, |
111 | - 'orderLogic' => function ($query, $column, $columnDirection) use ($locale) { |
|
111 | + 'orderLogic' => function ($query, $column, $columnDirection) use ($locale){ |
|
112 | 112 | return $query->orderBy('name->' . $locale, $columnDirection)->select('*'); |
113 | 113 | } |
114 | 114 | ]); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | 'type' => 'text', |
130 | 130 | 'label' => 'Type', |
131 | 131 | 'orderable' => true, |
132 | - 'orderLogic' => function ($query, $column, $columnDirection) use ($locale) { |
|
132 | + 'orderLogic' => function ($query, $column, $columnDirection) use ($locale){ |
|
133 | 133 | return $query->orderBy('skill_type_id', $columnDirection)->select('*'); |
134 | 134 | } |
135 | 135 | ]); |
@@ -163,13 +163,13 @@ discard block |
||
163 | 163 | 'key' => 'classifications_filter', |
164 | 164 | 'type' => 'select2_multiple', |
165 | 165 | 'label' => 'Filter by classification' |
166 | - ], function () { |
|
166 | + ], function (){ |
|
167 | 167 | // The options that show up in the select2. |
168 | 168 | return Classification::all()->pluck('key', 'id')->toArray(); |
169 | - }, function ($values) { |
|
169 | + }, function ($values){ |
|
170 | 170 | // If the filter is active. |
171 | 171 | foreach (json_decode($values) as $key => $value) { |
172 | - $this->crud->query = $this->crud->query->whereHas('classifications', function ($query) use ($value) { |
|
172 | + $this->crud->query = $this->crud->query->whereHas('classifications', function ($query) use ($value){ |
|
173 | 173 | $query->where('id', $value); |
174 | 174 | }); |
175 | 175 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | 'label'=> 'No classification' |
184 | 184 | ], |
185 | 185 | false, |
186 | - function () { |
|
186 | + function (){ |
|
187 | 187 | $this->crud->query = $this->crud->query->doesntHave('classifications'); |
188 | 188 | } |
189 | 189 | ); |
@@ -70,9 +70,9 @@ |
||
70 | 70 | 'name' => 'user_role', |
71 | 71 | 'type' => 'select2', |
72 | 72 | 'label' => 'Role' |
73 | - ], function () { |
|
73 | + ], function(){ |
|
74 | 74 | return UserRole::all()->keyBy('id')->pluck('name', 'id')->toArray(); |
75 | - }, function ($value) : void { |
|
75 | + }, function($value) : void { |
|
76 | 76 | $this->crud->addClause('where', 'user_role_id', $value); |
77 | 77 | }); |
78 | 78 | } |
@@ -70,7 +70,7 @@ |
||
70 | 70 | 'name' => 'user_role', |
71 | 71 | 'type' => 'select2', |
72 | 72 | 'label' => 'Role' |
73 | - ], function () { |
|
73 | + ], function (){ |
|
74 | 74 | return UserRole::all()->keyBy('id')->pluck('name', 'id')->toArray(); |
75 | 75 | }, function ($value) : void { |
76 | 76 | $this->crud->addClause('where', 'user_role_id', $value); |
@@ -177,8 +177,8 @@ |
||
177 | 177 | 'type' => 'date_picker', |
178 | 178 | 'label' => 'Letter of Offer Issuance Date', |
179 | 179 | 'date_picker_options' => [ |
180 | - 'todayBtn' => 'linked', |
|
181 | - 'format' => 'yyyy-mm-dd', |
|
180 | + 'todayBtn' => 'linked', |
|
181 | + 'format' => 'yyyy-mm-dd', |
|
182 | 182 | ], |
183 | 183 | ]); |
184 | 184 | if ($this->crud->getCurrentEntry() && |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | 'type' => 'closure', |
64 | 64 | 'label' => 'Manager', |
65 | 65 | 'orderable' => false, |
66 | - 'function' => function ($entry) { |
|
66 | + 'function' => function($entry){ |
|
67 | 67 | return '<a href="' . route('manager.profile.edit', $entry->manager->user->id) . '" target="_blank">' . $entry->manager->user->full_name . '</a>'; |
68 | 68 | } |
69 | 69 | ]); |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | 'name' => 'departments', |
85 | 85 | 'type' => 'select2_multiple', |
86 | 86 | 'label' => 'Departments' |
87 | - ], function () { |
|
87 | + ], function(){ |
|
88 | 88 | return Department::all()->pluck('name', 'id')->toArray(); |
89 | - }, function ($values) { |
|
90 | - $this->crud->addClause('WhereHas', 'department', function ($query) use ($values) { |
|
89 | + }, function($values){ |
|
90 | + $this->crud->addClause('WhereHas', 'department', function($query) use ($values) { |
|
91 | 91 | foreach (json_decode($values) as $key => $value) { |
92 | 92 | if ($key === 0) { |
93 | 93 | $query->where('id', $value); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | 'type' => 'closure', |
64 | 64 | 'label' => 'Manager', |
65 | 65 | 'orderable' => false, |
66 | - 'function' => function ($entry) { |
|
66 | + 'function' => function ($entry){ |
|
67 | 67 | return '<a href="' . route('manager.profile.edit', $entry->manager->user->id) . '" target="_blank">' . $entry->manager->user->full_name . '</a>'; |
68 | 68 | } |
69 | 69 | ]); |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | 'name' => 'departments', |
85 | 85 | 'type' => 'select2_multiple', |
86 | 86 | 'label' => 'Departments' |
87 | - ], function () { |
|
87 | + ], function (){ |
|
88 | 88 | return Department::all()->pluck('name', 'id')->toArray(); |
89 | - }, function ($values) { |
|
90 | - $this->crud->addClause('WhereHas', 'department', function ($query) use ($values) { |
|
89 | + }, function ($values){ |
|
90 | + $this->crud->addClause('WhereHas', 'department', function ($query) use ($values){ |
|
91 | 91 | foreach (json_decode($values) as $key => $value) { |
92 | 92 | if ($key === 0) { |
93 | 93 | $query->where('id', $value); |