@@ -40,18 +40,17 @@ |
||
40 | 40 | public function show(JobApplication $application) |
41 | 41 | { |
42 | 42 | $criteria = [ |
43 | - 'essential' => $application->job_poster->criteria->filter(function ($value, $key) { |
|
43 | + 'essential' => $application->job_poster->criteria->filter(function($value, $key){ |
|
44 | 44 | return $value->criteria_type->name == 'essential'; |
45 | 45 | }), |
46 | - 'asset' => $application->job_poster->criteria->filter(function ($value, $key) { |
|
46 | + 'asset' => $application->job_poster->criteria->filter(function($value, $key){ |
|
47 | 47 | return $value->criteria_type->name == 'asset'; |
48 | 48 | }), |
49 | 49 | ]; |
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. |
@@ -40,10 +40,10 @@ |
||
40 | 40 | public function show(JobApplication $application) |
41 | 41 | { |
42 | 42 | $criteria = [ |
43 | - 'essential' => $application->job_poster->criteria->filter(function ($value, $key) { |
|
43 | + 'essential' => $application->job_poster->criteria->filter(function ($value, $key){ |
|
44 | 44 | return $value->criteria_type->name == 'essential'; |
45 | 45 | }), |
46 | - 'asset' => $application->job_poster->criteria->filter(function ($value, $key) { |
|
46 | + 'asset' => $application->job_poster->criteria->filter(function ($value, $key){ |
|
47 | 47 | return $value->criteria_type->name == 'asset'; |
48 | 48 | }), |
49 | 49 | ]; |
@@ -107,7 +107,7 @@ |
||
107 | 107 | { |
108 | 108 | $rotatedArray = []; |
109 | 109 | foreach ($expandedArray as $item) { |
110 | - for ($i=0; $i<$steps; $i++) { |
|
110 | + for ($i = 0; $i < $steps; $i++) { |
|
111 | 111 | array_push($item['keys'], array_shift($item['keys'])); |
112 | 112 | } |
113 | 113 | $rotatedArray[] = $item; |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | { |
22 | 22 | $this->authorize('create', RatingGuideQuestion::class); |
23 | 23 | |
24 | - $job_poster_id = (int)$request->json('job_poster_id'); |
|
25 | - $assessment_type_id = (int)$request->json('assessment_type_id'); |
|
24 | + $job_poster_id = (int) $request->json('job_poster_id'); |
|
25 | + $assessment_type_id = (int) $request->json('assessment_type_id'); |
|
26 | 26 | $question = $request->json('question'); |
27 | 27 | |
28 | 28 | JobPoster::findOrFail($job_poster_id); |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | { |
74 | 74 | $this->authorize('update', $ratingGuideQuestion); |
75 | 75 | |
76 | - $job_poster_id = (int)$request->json('job_poster_id'); |
|
77 | - $assessment_type_id = (int)$request->json('assessment_type_id'); |
|
76 | + $job_poster_id = (int) $request->json('job_poster_id'); |
|
77 | + $assessment_type_id = (int) $request->json('assessment_type_id'); |
|
78 | 78 | $question = $request->json('question'); |
79 | 79 | |
80 | 80 | JobPoster::findOrFail($job_poster_id); |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | $this->authorize('create', Assessment::class); |
22 | 22 | |
23 | 23 | try { |
24 | - $criterion_id = (int)$request->json('criterion_id'); |
|
25 | - $assessment_type_id = (int)$request->json('assessment_type_id'); |
|
24 | + $criterion_id = (int) $request->json('criterion_id'); |
|
25 | + $assessment_type_id = (int) $request->json('assessment_type_id'); |
|
26 | 26 | $criteria = Criteria::findOrFail($criterion_id); |
27 | 27 | AssessmentType::findOrFail($assessment_type_id); |
28 | 28 | |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | { |
74 | 74 | $this->authorize('update', $assessment); |
75 | 75 | try { |
76 | - $criterion_id = (int)$request->json('criterion_id'); |
|
77 | - $assessment_type_id = (int)$request->json('assessment_type_id'); |
|
76 | + $criterion_id = (int) $request->json('criterion_id'); |
|
77 | + $assessment_type_id = (int) $request->json('assessment_type_id'); |
|
78 | 78 | $criteria = Criteria::findOrFail($criterion_id); |
79 | 79 | AssessmentType::findOrFail($assessment_type_id); |
80 | 80 |
@@ -190,6 +190,6 @@ |
||
190 | 190 | $this->guard()->login($user); |
191 | 191 | |
192 | 192 | return $this->registered($request, $user) |
193 | - ?: redirect($this->redirectPath()); |
|
193 | + ? : redirect($this->redirectPath()); |
|
194 | 194 | } |
195 | 195 | } |
@@ -159,10 +159,10 @@ discard block |
||
159 | 159 | $this->authorize('update', $application); |
160 | 160 | |
161 | 161 | $criteria = [ |
162 | - 'essential' => $jobPoster->criteria->filter(function ($value, $key) { |
|
162 | + 'essential' => $jobPoster->criteria->filter(function($value, $key){ |
|
163 | 163 | return $value->criteria_type->name == 'essential'; |
164 | 164 | }), |
165 | - 'asset' => $jobPoster->criteria->filter(function ($value, $key) { |
|
165 | + 'asset' => $jobPoster->criteria->filter(function($value, $key){ |
|
166 | 166 | return $value->criteria_type->name == 'asset'; |
167 | 167 | }), |
168 | 168 | ]; |
@@ -204,10 +204,10 @@ discard block |
||
204 | 204 | $this->authorize('update', $application); |
205 | 205 | |
206 | 206 | $criteria = [ |
207 | - 'essential' => $jobPoster->criteria->filter(function ($value, $key) { |
|
207 | + 'essential' => $jobPoster->criteria->filter(function($value, $key){ |
|
208 | 208 | return $value->criteria_type->name == 'essential'; |
209 | 209 | }), |
210 | - 'asset' => $jobPoster->criteria->filter(function ($value, $key) { |
|
210 | + 'asset' => $jobPoster->criteria->filter(function($value, $key){ |
|
211 | 211 | return $value->criteria_type->name == 'asset'; |
212 | 212 | }), |
213 | 213 | ]; |
@@ -246,10 +246,10 @@ discard block |
||
246 | 246 | |
247 | 247 | $this->authorize('view', $application); |
248 | 248 | $criteria = [ |
249 | - 'essential' => $jobPoster->criteria->filter(function ($value, $key) { |
|
249 | + 'essential' => $jobPoster->criteria->filter(function($value, $key){ |
|
250 | 250 | return $value->criteria_type->name == 'essential'; |
251 | 251 | }), |
252 | - 'asset' => $jobPoster->criteria->filter(function ($value, $key) { |
|
252 | + 'asset' => $jobPoster->criteria->filter(function($value, $key){ |
|
253 | 253 | return $value->criteria_type->name == 'asset'; |
254 | 254 | }), |
255 | 255 | ]; |
@@ -159,10 +159,10 @@ discard block |
||
159 | 159 | $this->authorize('update', $application); |
160 | 160 | |
161 | 161 | $criteria = [ |
162 | - 'essential' => $jobPoster->criteria->filter(function ($value, $key) { |
|
162 | + 'essential' => $jobPoster->criteria->filter(function ($value, $key){ |
|
163 | 163 | return $value->criteria_type->name == 'essential'; |
164 | 164 | }), |
165 | - 'asset' => $jobPoster->criteria->filter(function ($value, $key) { |
|
165 | + 'asset' => $jobPoster->criteria->filter(function ($value, $key){ |
|
166 | 166 | return $value->criteria_type->name == 'asset'; |
167 | 167 | }), |
168 | 168 | ]; |
@@ -204,10 +204,10 @@ discard block |
||
204 | 204 | $this->authorize('update', $application); |
205 | 205 | |
206 | 206 | $criteria = [ |
207 | - 'essential' => $jobPoster->criteria->filter(function ($value, $key) { |
|
207 | + 'essential' => $jobPoster->criteria->filter(function ($value, $key){ |
|
208 | 208 | return $value->criteria_type->name == 'essential'; |
209 | 209 | }), |
210 | - 'asset' => $jobPoster->criteria->filter(function ($value, $key) { |
|
210 | + 'asset' => $jobPoster->criteria->filter(function ($value, $key){ |
|
211 | 211 | return $value->criteria_type->name == 'asset'; |
212 | 212 | }), |
213 | 213 | ]; |
@@ -246,10 +246,10 @@ discard block |
||
246 | 246 | |
247 | 247 | $this->authorize('view', $application); |
248 | 248 | $criteria = [ |
249 | - 'essential' => $jobPoster->criteria->filter(function ($value, $key) { |
|
249 | + 'essential' => $jobPoster->criteria->filter(function ($value, $key){ |
|
250 | 250 | return $value->criteria_type->name == 'essential'; |
251 | 251 | }), |
252 | - 'asset' => $jobPoster->criteria->filter(function ($value, $key) { |
|
252 | + 'asset' => $jobPoster->criteria->filter(function ($value, $key){ |
|
253 | 253 | return $value->criteria_type->name == 'asset'; |
254 | 254 | }), |
255 | 255 | ]; |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | ]); |
459 | 459 | $degree->save(); |
460 | 460 | } else { |
461 | - Log::warning("Applicant $applicant->id attempted to update degree with invalid id: $id"); |
|
461 | + Log::warning("applicant $applicant->id attempted to update degree with invalid id: $id"); |
|
462 | 462 | } |
463 | 463 | } |
464 | 464 | } |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | ]); |
505 | 505 | $course->save(); |
506 | 506 | } else { |
507 | - Log::warning("Applicant $applicant->id attempted to update course with invalid id: $id"); |
|
507 | + Log::warning("applicant $applicant->id attempted to update course with invalid id: $id"); |
|
508 | 508 | } |
509 | 509 | } |
510 | 510 | } |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | ]); |
551 | 551 | $workExperience->save(); |
552 | 552 | } else { |
553 | - Log::warning("Applicant $applicant->id attempted to update work_experience with invalid id: $id"); |
|
553 | + Log::warning("applicant $applicant->id attempted to update work_experience with invalid id: $id"); |
|
554 | 554 | } |
555 | 555 | } |
556 | 556 | } |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | $sampleIds = $this->getRelativeIds($skillDeclarationInput, 'samples'); |
634 | 634 | $skillDeclaration->work_samples()->sync($sampleIds); |
635 | 635 | } else { |
636 | - Log::warning("Applicant $applicant->id attempted to update skill declaration with invalid id: $id"); |
|
636 | + Log::warning("applicant $applicant->id attempted to update skill declaration with invalid id: $id"); |
|
637 | 637 | } |
638 | 638 | } |
639 | 639 | } |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | $sampleIds = $this->getRelativeIds($skillDeclarationInput, 'samples'); |
718 | 718 | $skillDeclaration->work_samples()->sync($sampleIds); |
719 | 719 | } else { |
720 | - Log::warning("Applicant $applicant->id attempted to update skill declaration with invalid id: $id"); |
|
720 | + Log::warning("applicant $applicant->id attempted to update skill declaration with invalid id: $id"); |
|
721 | 721 | } |
722 | 722 | } |
723 | 723 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | protected function commands(): void |
42 | 42 | { |
43 | - $this->load(__DIR__.'/Commands'); |
|
43 | + $this->load(__DIR__ . '/Commands'); |
|
44 | 44 | |
45 | 45 | require base_path('routes/console.php'); |
46 | 46 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | // search $needle in process status |
61 | 61 | $result = array_filter( |
62 | 62 | $process_status, |
63 | - function ($var) use ($needle) { |
|
63 | + function($var) use ($needle) { |
|
64 | 64 | return strpos($var, $needle); |
65 | 65 | } |
66 | 66 | ); |
@@ -60,7 +60,7 @@ |
||
60 | 60 | // search $needle in process status |
61 | 61 | $result = array_filter( |
62 | 62 | $process_status, |
63 | - function ($var) use ($needle) { |
|
63 | + function ($var) use ($needle){ |
|
64 | 64 | return strpos($var, $needle); |
65 | 65 | } |
66 | 66 | ); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function passes($attribute, $value) |
33 | 33 | { |
34 | - return $value->contains(function ($object) { |
|
34 | + return $value->contains(function($object){ |
|
35 | 35 | $object->getRelationValue($this->relationName)->is($this->relationValue); |
36 | 36 | }); |
37 | 37 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function passes($attribute, $value) |
33 | 33 | { |
34 | - return $value->contains(function ($object) { |
|
34 | + return $value->contains(function ($object){ |
|
35 | 35 | $object->getRelationValue($this->relationName)->is($this->relationValue); |
36 | 36 | }); |
37 | 37 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | // debugbar()->debug($value); |
47 | 47 | // debugbar()->debug($this->attributeName); |
48 | 48 | // debugbar()->debug($this->attributeValue); |
49 | - return $this->array_any($value, function ($object) { |
|
49 | + return $this->array_any($value, function($object){ |
|
50 | 50 | return $object[$this->attributeName] == $this->attributeValue; |
51 | 51 | }); |
52 | 52 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | // debugbar()->debug($value); |
47 | 47 | // debugbar()->debug($this->attributeName); |
48 | 48 | // debugbar()->debug($this->attributeValue); |
49 | - return $this->array_any($value, function ($object) { |
|
49 | + return $this->array_any($value, function ($object){ |
|
50 | 50 | return $object[$this->attributeName] == $this->attributeValue; |
51 | 51 | }); |
52 | 52 | } |