Passed
Push — task/common-translation-packag... ( 1125af...852212 )
by Grant
08:02
created
app/Http/Controllers/RatingGuideAnswerController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
     {
20 20
         // Authorization handled by the FormRequest.
21 21
         // Data validation handled by this line.
22
-        $data = $request->validated();
23
-        $ratingGuideAnswer = new RatingGuideAnswer($data);
24
-        $ratingGuideAnswer->save();
22
+        $data = $request->validated ();
23
+        $ratingGuideAnswer = new RatingGuideAnswer ($data);
24
+        $ratingGuideAnswer->save ();
25 25
 
26 26
         return [
27 27
             'success' => "Successfully created rating guide answer $ratingGuideAnswer->id",
28
-            'rating_guide_answer' => $ratingGuideAnswer->toArray(),
28
+            'rating_guide_answer' => $ratingGuideAnswer->toArray (),
29 29
         ];
30 30
     }
31 31
 
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function show(RatingGuideAnswer $ratingGuideAnswer)
39 39
     {
40
-        $this->authorize('view', $ratingGuideAnswer);
41
-        return $ratingGuideAnswer->toArray();
40
+        $this->authorize ('view', $ratingGuideAnswer);
41
+        return $ratingGuideAnswer->toArray ();
42 42
     }
43 43
 
44 44
     /**
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
     {
54 54
         // Authorization handled by the FormRequest.
55 55
         // Data validation handled by this line.
56
-        $data = $request->validated();
56
+        $data = $request->validated ();
57 57
 
58
-        $ratingGuideAnswer->fill($data);
59
-        $ratingGuideAnswer->save();
60
-        $ratingGuideAnswer->refresh();
58
+        $ratingGuideAnswer->fill ($data);
59
+        $ratingGuideAnswer->save ();
60
+        $ratingGuideAnswer->refresh ();
61 61
         return [
62 62
             'success' => "Successfully updated rating guide answer $ratingGuideAnswer->id",
63
-            'rating_guide_answer' => $ratingGuideAnswer->toArray(),
63
+            'rating_guide_answer' => $ratingGuideAnswer->toArray (),
64 64
         ];
65 65
     }
66 66
 
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function destroy(RatingGuideAnswer $ratingGuideAnswer)
74 74
     {
75
-        $this->authorize('delete', $ratingGuideAnswer);
76
-        $ratingGuideAnswer->delete();
75
+        $this->authorize ('delete', $ratingGuideAnswer);
76
+        $ratingGuideAnswer->delete ();
77 77
 
78 78
         return [
79 79
             'success' => "Successfully deleted rating guide answer $ratingGuideAnswer->id"
Please login to merge, or discard this patch.
app/Http/Controllers/ApplicationByJobController.php 1 patch
Spacing   +201 added lines, -201 removed lines patch added patch discarded remove patch
@@ -34,22 +34,22 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function index(JobPoster $jobPoster)
36 36
     {
37
-        $applications = $jobPoster->submitted_applications()
38
-            ->with([
37
+        $applications = $jobPoster->submitted_applications ()
38
+            ->with ([
39 39
                 'veteran_status',
40 40
                 'citizenship_declaration',
41 41
                 'application_review',
42 42
                 'applicant.user',
43 43
                 'job_poster.criteria',
44 44
             ])
45
-            ->get();
46
-        return view('manager/review_applications', [
45
+            ->get ();
46
+        return view ('manager/review_applications', [
47 47
             // Localization Strings.
48
-            'jobs_l10n' => Lang::get('manager/job_index'),
48
+            'jobs_l10n' => Lang::get ('manager/job_index'),
49 49
             // Data.
50
-            'job' => $jobPoster->toApiArray(),
50
+            'job' => $jobPoster->toApiArray (),
51 51
             'applications' => $applications,
52
-            'review_statuses' => ReviewStatus::all()
52
+            'review_statuses' => ReviewStatus::all ()
53 53
         ]);
54 54
     }
55 55
 
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
      */
62 62
     protected function getApplicationFromJob(JobPoster $jobPoster)
63 63
     {
64
-        $application = JobApplication::where('applicant_id', Auth::user()->applicant->id)
65
-            ->where('job_poster_id', $jobPoster->id)->first();
64
+        $application = JobApplication::where ('applicant_id', Auth::user ()->applicant->id)
65
+            ->where ('job_poster_id', $jobPoster->id)->first ();
66 66
         if ($application == null) {
67
-            $application = new JobApplication();
67
+            $application = new JobApplication ();
68 68
             $application->job_poster_id = $jobPoster->id;
69
-            $application->applicant_id = Auth::user()->applicant->id;
70
-            $application->application_status_id = ApplicationStatus::where('name', 'draft')->firstOrFail()->id;
71
-            $application->save();
69
+            $application->applicant_id = Auth::user ()->applicant->id;
70
+            $application->application_status_id = ApplicationStatus::where ('name', 'draft')->firstOrFail ()->id;
71
+            $application->save ();
72 72
         }
73 73
         return $application;
74 74
     }
@@ -81,32 +81,32 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function editBasics(JobPoster $jobPoster)
83 83
     {
84
-        $applicant = Auth::user()->applicant;
85
-        $application = $this->getApplicationFromJob($jobPoster);
84
+        $applicant = Auth::user ()->applicant;
85
+        $application = $this->getApplicationFromJob ($jobPoster);
86 86
 
87 87
         // Ensure user has permissions to view and update application.
88
-        $this->authorize('view', $application);
89
-        $this->authorize('update', $application);
88
+        $this->authorize ('view', $application);
89
+        $this->authorize ('update', $application);
90 90
 
91
-        return view(
91
+        return view (
92 92
             'applicant/application_post_01',
93 93
             [
94 94
                 // Application Template Data.
95 95
                 'application_step' => 1,
96
-                'application_template' => Lang::get('applicant/application_template'),
97
-                'language_options' => PreferredLanguage::all(),
98
-                'citizenship_options' => CitizenshipDeclaration::all(),
99
-                'veteran_options' => VeteranStatus::all(),
100
-                'preferred_language_template' => Lang::get('common/preferred_language'),
101
-                'citizenship_declaration_template' => Lang::get('common/citizenship_declaration'),
102
-                'veteran_status_template' => Lang::get('common/veteran_status'),
96
+                'application_template' => Lang::get ('applicant/application_template'),
97
+                'language_options' => PreferredLanguage::all (),
98
+                'citizenship_options' => CitizenshipDeclaration::all (),
99
+                'veteran_options' => VeteranStatus::all (),
100
+                'preferred_language_template' => Lang::get ('common/preferred_language'),
101
+                'citizenship_declaration_template' => Lang::get ('common/citizenship_declaration'),
102
+                'veteran_status_template' => Lang::get ('common/veteran_status'),
103 103
                 // Job Data.
104 104
                 'job' => $jobPoster,
105 105
                 // Applicant Data.
106 106
                 'applicant' => $applicant,
107 107
                 'job_application' => $application,
108 108
                 // Submission.
109
-                'form_submit_action' => route('job.application.update.1', $jobPoster)
109
+                'form_submit_action' => route ('job.application.update.1', $jobPoster)
110 110
             ]
111 111
         );
112 112
     }
@@ -119,26 +119,26 @@  discard block
 block discarded – undo
119 119
      */
120 120
     public function editExperience(JobPoster $jobPoster)
121 121
     {
122
-        $applicant = Auth::user()->applicant;
123
-        $application = $this->getApplicationFromJob($jobPoster);
122
+        $applicant = Auth::user ()->applicant;
123
+        $application = $this->getApplicationFromJob ($jobPoster);
124 124
 
125 125
         // Ensure user has permissions to view and update application.
126
-        $this->authorize('view', $application);
127
-        $this->authorize('update', $application);
126
+        $this->authorize ('view', $application);
127
+        $this->authorize ('update', $application);
128 128
 
129
-        return view(
129
+        return view (
130 130
             'applicant/application_post_02',
131 131
             [
132 132
                 // Application Template Data.
133 133
                 'application_step' => 2,
134
-                'application_template' => Lang::get('applicant/application_template'),
134
+                'application_template' => Lang::get ('applicant/application_template'),
135 135
                 // Job Data.
136 136
                 'job' => $jobPoster,
137 137
                 // Applicant Data.
138 138
                 'applicant' => $applicant,
139 139
                 'job_application' => $application,
140 140
                 // Submission.
141
-                'form_submit_action' => route('job.application.update.2', $jobPoster)
141
+                'form_submit_action' => route ('job.application.update.2', $jobPoster)
142 142
             ]
143 143
         );
144 144
     }
@@ -151,39 +151,39 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function editEssentialSkills(JobPoster $jobPoster)
153 153
     {
154
-        $applicant = Auth::user()->applicant;
155
-        $application = $this->getApplicationFromJob($jobPoster);
154
+        $applicant = Auth::user ()->applicant;
155
+        $application = $this->getApplicationFromJob ($jobPoster);
156 156
 
157 157
         // Ensure user has permissions to view and update application.
158
-        $this->authorize('view', $application);
159
-        $this->authorize('update', $application);
158
+        $this->authorize ('view', $application);
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
         ];
169 169
 
170
-        return view(
170
+        return view (
171 171
             'applicant/application_post_03',
172 172
             [
173 173
                 // Application Template Data.
174 174
                 'application_step' => 3,
175
-                'application_template' => Lang::get('applicant/application_template'),
175
+                'application_template' => Lang::get ('applicant/application_template'),
176 176
                 // Job Data.
177 177
                 'job' => $jobPoster,
178 178
                 // Skills Data.
179
-                'skills' => Skill::all(),
180
-                'skill_template' => Lang::get('common/skills'),
179
+                'skills' => Skill::all (),
180
+                'skill_template' => Lang::get ('common/skills'),
181 181
                 'criteria' => $criteria,
182 182
                 // Applicant Data.
183 183
                 'applicant' => $applicant,
184 184
                 'job_application' => $application,
185 185
                 // Submission.
186
-                'form_submit_action' => route('job.application.update.3', $jobPoster)
186
+                'form_submit_action' => route ('job.application.update.3', $jobPoster)
187 187
             ]
188 188
         );
189 189
     }
@@ -196,39 +196,39 @@  discard block
 block discarded – undo
196 196
      */
197 197
     public function editAssetSkills(JobPoster $jobPoster)
198 198
     {
199
-        $applicant = Auth::user()->applicant;
200
-        $application = $this->getApplicationFromJob($jobPoster);
199
+        $applicant = Auth::user ()->applicant;
200
+        $application = $this->getApplicationFromJob ($jobPoster);
201 201
 
202 202
         // Ensure user has permissions to view and update application.
203
-        $this->authorize('view', $application);
204
-        $this->authorize('update', $application);
203
+        $this->authorize ('view', $application);
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
         ];
214 214
 
215
-        return view(
215
+        return view (
216 216
             'applicant/application_post_04',
217 217
             [
218 218
                 // Application Template Data.
219 219
                 'application_step' => 4,
220
-                'application_template' => Lang::get('applicant/application_template'),
220
+                'application_template' => Lang::get ('applicant/application_template'),
221 221
                 // Job Data.
222 222
                 'job' => $jobPoster,
223 223
                 // Skills Data.
224
-                'skills' => Skill::all(),
225
-                'skill_template' => Lang::get('common/skills'),
224
+                'skills' => Skill::all (),
225
+                'skill_template' => Lang::get ('common/skills'),
226 226
                 'criteria' => $criteria,
227 227
                 // Applicant Data.
228 228
                 'applicant' => $applicant,
229 229
                 'job_application' => $application,
230 230
                 // Submission.
231
-                'form_submit_action' => route('job.application.update.4', $jobPoster)
231
+                'form_submit_action' => route ('job.application.update.4', $jobPoster)
232 232
             ]
233 233
         );
234 234
     }
@@ -241,38 +241,38 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function preview(JobPoster $jobPoster)
243 243
     {
244
-        $applicant = Auth::user()->applicant;
245
-        $application = $this->getApplicationFromJob($jobPoster);
244
+        $applicant = Auth::user ()->applicant;
245
+        $application = $this->getApplicationFromJob ($jobPoster);
246 246
 
247
-        $this->authorize('view', $application);
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
         ];
256 256
 
257
-        return view(
257
+        return view (
258 258
             'applicant/application_post_05',
259 259
             [
260 260
                 // Application Template Data.
261 261
                 'application_step' => 5,
262
-                'application_template' => Lang::get('applicant/application_template'),
263
-                'preferred_language_template' => Lang::get('common/preferred_language'),
264
-                'citizenship_declaration_template' => Lang::get('common/citizenship_declaration'),
265
-                'veteran_status_template' => Lang::get('common/veteran_status'),
262
+                'application_template' => Lang::get ('applicant/application_template'),
263
+                'preferred_language_template' => Lang::get ('common/preferred_language'),
264
+                'citizenship_declaration_template' => Lang::get ('common/citizenship_declaration'),
265
+                'veteran_status_template' => Lang::get ('common/veteran_status'),
266 266
                 // Job Data.
267 267
                 'job' => $jobPoster,
268 268
                 // Skills Data.
269
-                'skills' => Skill::all(),
270
-                'skill_template' => Lang::get('common/skills'),
269
+                'skills' => Skill::all (),
270
+                'skill_template' => Lang::get ('common/skills'),
271 271
                 'criteria' => $criteria,
272 272
                 // Applicant Data.
273 273
                 'applicant' => $applicant,
274 274
                 'job_application' => $application,
275
-                'is_manager_view' => WhichPortal::isManagerPortal(),
275
+                'is_manager_view' => WhichPortal::isManagerPortal (),
276 276
             ]
277 277
         );
278 278
     }
@@ -285,22 +285,22 @@  discard block
 block discarded – undo
285 285
      */
286 286
     public function confirm(JobPoster $jobPoster)
287 287
     {
288
-        $applicant = Auth::user()->applicant;
289
-        $application = $this->getApplicationFromJob($jobPoster);
288
+        $applicant = Auth::user ()->applicant;
289
+        $application = $this->getApplicationFromJob ($jobPoster);
290 290
 
291
-        $this->authorize('update', $application);
291
+        $this->authorize ('update', $application);
292 292
 
293
-        return view(
293
+        return view (
294 294
             'applicant/application_post_06',
295 295
             [
296 296
                 // Application Template Data.
297 297
                 'application_step' => 6,
298
-                'application_template' => Lang::get('applicant/application_template'),
298
+                'application_template' => Lang::get ('applicant/application_template'),
299 299
                 // Used by tracker partial.
300 300
                 'job' => $jobPoster,
301 301
                 'job_application' => $application,
302 302
                 // Submission.
303
-                'form_submit_action' => route('job.application.submit', $jobPoster)
303
+                'form_submit_action' => route ('job.application.submit', $jobPoster)
304 304
             ]
305 305
         );
306 306
     }
@@ -314,19 +314,19 @@  discard block
 block discarded – undo
314 314
     public function complete(JobPoster $jobPoster)
315 315
     {
316 316
         // Include Applicant Data.
317
-        $applicant = Auth::user()->applicant;
317
+        $applicant = Auth::user ()->applicant;
318 318
         // Include Application Data.
319
-        $application = $this->getApplicationFromJob($jobPoster);
319
+        $application = $this->getApplicationFromJob ($jobPoster);
320 320
 
321 321
         // Ensure user has permissions to view application.
322
-        $this->authorize('view', $application);
322
+        $this->authorize ('view', $application);
323 323
 
324 324
         // Return the Completion View.
325
-        return view(
325
+        return view (
326 326
             'applicant/application_post_complete',
327 327
             [
328 328
                 // Application Template Data.
329
-                'application_template' => Lang::get('applicant/application_template'),
329
+                'application_template' => Lang::get ('applicant/application_template'),
330 330
                 // Job Data.
331 331
                 'job' => $jobPoster,
332 332
                 // Applicant Data.
@@ -345,50 +345,50 @@  discard block
 block discarded – undo
345 345
      */
346 346
     public function updateBasics(Request $request, JobPoster $jobPoster)
347 347
     {
348
-        $applicant = Auth::user()->applicant;
349
-        $application = $this->getApplicationFromJob($jobPoster);
348
+        $applicant = Auth::user ()->applicant;
349
+        $application = $this->getApplicationFromJob ($jobPoster);
350 350
 
351 351
         // Ensure user has permissions to update this application.
352
-        $this->authorize('update', $application);
352
+        $this->authorize ('update', $application);
353 353
 
354
-        $application->fill([
355
-            'citizenship_declaration_id' => $request->input('citizenship_declaration_id'),
356
-            'veteran_status_id' => $request->input('veteran_status_id'),
357
-            'preferred_language_id' => $request->input('preferred_language_id'),
358
-            'language_requirement_confirmed' => $request->input('language_requirement_confirmed')
354
+        $application->fill ([
355
+            'citizenship_declaration_id' => $request->input ('citizenship_declaration_id'),
356
+            'veteran_status_id' => $request->input ('veteran_status_id'),
357
+            'preferred_language_id' => $request->input ('preferred_language_id'),
358
+            'language_requirement_confirmed' => $request->input ('language_requirement_confirmed')
359 359
         ]);
360
-        $application->save();
360
+        $application->save ();
361 361
 
362 362
         $questions = $jobPoster->job_poster_questions;
363
-        $questionsInput = $request->input('questions');
363
+        $questionsInput = $request->input ('questions');
364 364
         foreach ($questions as $question) {
365 365
             $answer = null;
366 366
             if (isset($questionsInput[$question->id])) {
367 367
                 $answer = $questionsInput[$question->id];
368 368
             }
369 369
             $answerObj = $application->job_application_answers
370
-            ->firstWhere('job_poster_question_id', $question->id);
370
+            ->firstWhere ('job_poster_question_id', $question->id);
371 371
             if ($answerObj == null) {
372
-                $answerObj = new JobApplicationAnswer();
372
+                $answerObj = new JobApplicationAnswer ();
373 373
                 $answerObj->job_poster_question_id = $question->id;
374 374
                 $answerObj->job_application_id = $application->id;
375 375
             }
376 376
             $answerObj->answer = $answer;
377
-            $answerObj->save();
377
+            $answerObj->save ();
378 378
         }
379 379
 
380 380
         // Redirect to correct page.
381
-        switch ($request->input('submit')) {
381
+        switch ($request->input ('submit')) {
382 382
             case 'save_and_quit':
383 383
             case 'previous':
384
-                return redirect()->route('applications.index');
384
+                return redirect ()->route ('applications.index');
385 385
                 break;
386 386
             case 'save_and_continue':
387 387
             case 'next':
388
-                return redirect()->route('job.application.edit.2', $jobPoster);
388
+                return redirect ()->route ('job.application.edit.2', $jobPoster);
389 389
                 break;
390 390
             default:
391
-                return redirect()->back()->withInput();
391
+                return redirect ()->back ()->withInput ();
392 392
         }
393 393
     }
394 394
 
@@ -401,19 +401,19 @@  discard block
 block discarded – undo
401 401
      */
402 402
     public function updateExperience(Request $request, JobPoster $jobPoster)
403 403
     {
404
-        $applicant = Auth::user()->applicant;
405
-        $application = $this->getApplicationFromJob($jobPoster);
404
+        $applicant = Auth::user ()->applicant;
405
+        $application = $this->getApplicationFromJob ($jobPoster);
406 406
 
407 407
         // Ensure user has permissions to update this application.
408
-        $this->authorize('update', $application);
408
+        $this->authorize ('update', $application);
409 409
 
410 410
         // Record that the user has saved their experience for this application.
411 411
         $application->experience_saved = true;
412
-        $application->save();
412
+        $application->save ();
413 413
 
414
-        $degrees = $request->input('degrees');
414
+        $degrees = $request->input ('degrees');
415 415
 
416
-        $request->validate([
416
+        $request->validate ([
417 417
             'degrees.new.*.degree_type_id' => 'required',
418 418
             'degrees.new.*.area_of_study'  => 'required',
419 419
             'degrees.new.*.institution'    => 'required',
@@ -426,9 +426,9 @@  discard block
 block discarded – undo
426 426
         // Save new degrees.
427 427
         if (isset($degrees['new'])) {
428 428
             foreach ($degrees['new'] as $degreeInput) {
429
-                $degree = new Degree();
429
+                $degree = new Degree ();
430 430
                 $degree->applicant_id = $applicant->id;
431
-                $degree->fill([
431
+                $degree->fill ([
432 432
                     'degree_type_id' => $degreeInput['degree_type_id'],
433 433
                     'area_of_study' => $degreeInput['area_of_study'],
434 434
                     'institution' => $degreeInput['institution'],
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
                     'end_date' => $degreeInput['end_date'],
438 438
                     'blockcert_url' => $degreeInput['blockcert_url'],
439 439
                 ]);
440
-                $degree->save();
440
+                $degree->save ();
441 441
             }
442 442
         }
443 443
 
@@ -445,9 +445,9 @@  discard block
 block discarded – undo
445 445
         if (isset($degrees['old'])) {
446 446
             foreach ($degrees['old'] as $id => $degreeInput) {
447 447
                 // Ensure this degree belongs to this applicant.
448
-                $degree = $applicant->degrees->firstWhere('id', $id);
448
+                $degree = $applicant->degrees->firstWhere ('id', $id);
449 449
                 if ($degree != null) {
450
-                    $degree->fill([
450
+                    $degree->fill ([
451 451
                         'degree_type_id' => $degreeInput['degree_type_id'],
452 452
                         'area_of_study' => $degreeInput['area_of_study'],
453 453
                         'institution' => $degreeInput['institution'],
@@ -456,16 +456,16 @@  discard block
 block discarded – undo
456 456
                         'end_date' => $degreeInput['end_date'],
457 457
                         'blockcert_url' => $degreeInput['blockcert_url'],
458 458
                     ]);
459
-                    $degree->save();
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
         }
465 465
 
466
-        $courses = $request->input('courses');
466
+        $courses = $request->input ('courses');
467 467
 
468
-        $request->validate([
468
+        $request->validate ([
469 469
             'courses.new.*.name'             => 'required',
470 470
             'courses.new.*.institution'      => 'required',
471 471
             'courses.new.*.course_status_id' => 'required',
@@ -476,16 +476,16 @@  discard block
 block discarded – undo
476 476
         // Save new courses.
477 477
         if (isset($courses['new'])) {
478 478
             foreach ($courses['new'] as $courseInput) {
479
-                $course = new Course();
479
+                $course = new Course ();
480 480
                 $course->applicant_id = $applicant->id;
481
-                $course->fill([
481
+                $course->fill ([
482 482
                     'name' => $courseInput['name'],
483 483
                     'institution' => $courseInput['institution'],
484 484
                     'course_status_id' => $courseInput['course_status_id'],
485 485
                     'start_date' => $courseInput['start_date'],
486 486
                     'end_date' => $courseInput['end_date']
487 487
                 ]);
488
-                $course->save();
488
+                $course->save ();
489 489
             }
490 490
         }
491 491
 
@@ -493,25 +493,25 @@  discard block
 block discarded – undo
493 493
         if (isset($courses['old'])) {
494 494
             foreach ($courses['old'] as $id => $courseInput) {
495 495
                 // Ensure this course belongs to this applicant.
496
-                $course = $applicant->courses->firstWhere('id', $id);
496
+                $course = $applicant->courses->firstWhere ('id', $id);
497 497
                 if ($course != null) {
498
-                    $course->fill([
498
+                    $course->fill ([
499 499
                         'name' => $courseInput['name'],
500 500
                         'institution' => $courseInput['institution'],
501 501
                         'course_status_id' => $courseInput['course_status_id'],
502 502
                         'start_date' => $courseInput['start_date'],
503 503
                         'end_date' => $courseInput['end_date']
504 504
                     ]);
505
-                    $course->save();
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
         }
511 511
 
512
-        $work_experiences = $request->input('work_experiences');
512
+        $work_experiences = $request->input ('work_experiences');
513 513
 
514
-        $request->validate([
514
+        $request->validate ([
515 515
             'work_experiences.new.*.role'        => 'required',
516 516
             'work_experiences.new.*.company'     => 'required',
517 517
             'work_experiences.new.*.description' => 'required',
@@ -522,16 +522,16 @@  discard block
 block discarded – undo
522 522
         // Save new work_experiences.
523 523
         if (isset($work_experiences['new'])) {
524 524
             foreach ($work_experiences['new'] as $workExperienceInput) {
525
-                $workExperience = new WorkExperience();
525
+                $workExperience = new WorkExperience ();
526 526
                 $workExperience->applicant_id = $applicant->id;
527
-                $workExperience->fill([
527
+                $workExperience->fill ([
528 528
                     'role' => $workExperienceInput['role'],
529 529
                     'company' => $workExperienceInput['company'],
530 530
                     'description' => $workExperienceInput['description'],
531 531
                     'start_date' => $workExperienceInput['start_date'],
532 532
                     'end_date' => $workExperienceInput['end_date']
533 533
                 ]);
534
-                $workExperience->save();
534
+                $workExperience->save ();
535 535
             }
536 536
         }
537 537
 
@@ -539,36 +539,36 @@  discard block
 block discarded – undo
539 539
         if (isset($work_experiences['old'])) {
540 540
             foreach ($work_experiences['old'] as $id => $workExperienceInput) {
541 541
                 // Ensure this work_experience belongs to this applicant.
542
-                $workExperience = $applicant->work_experiences->firstWhere('id', $id);
542
+                $workExperience = $applicant->work_experiences->firstWhere ('id', $id);
543 543
                 if ($workExperience != null) {
544
-                    $workExperience->fill([
544
+                    $workExperience->fill ([
545 545
                         'role' => $workExperienceInput['role'],
546 546
                         'company' => $workExperienceInput['company'],
547 547
                         'description' => $workExperienceInput['description'],
548 548
                         'start_date' => $workExperienceInput['start_date'],
549 549
                         'end_date' => $workExperienceInput['end_date']
550 550
                     ]);
551
-                    $workExperience->save();
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
         }
557 557
 
558 558
         // Redirect to correct page.
559
-        switch ($request->input('submit')) {
559
+        switch ($request->input ('submit')) {
560 560
             case 'save_and_quit':
561
-                return redirect()->route('applications.index');
561
+                return redirect ()->route ('applications.index');
562 562
                 break;
563 563
             case 'save_and_continue':
564 564
             case 'next':
565
-                return redirect()->route('job.application.edit.3', $jobPoster);
565
+                return redirect ()->route ('job.application.edit.3', $jobPoster);
566 566
                 break;
567 567
             case 'previous':
568
-                return redirect()->route('job.application.edit.1', $jobPoster);
568
+                return redirect ()->route ('job.application.edit.1', $jobPoster);
569 569
                 break;
570 570
             default:
571
-                return redirect()->back()->withInput();
571
+                return redirect ()->back ()->withInput ();
572 572
         }
573 573
     }
574 574
 
@@ -581,34 +581,34 @@  discard block
 block discarded – undo
581 581
      */
582 582
     public function updateEssentialSkills(Request $request, JobPoster $jobPoster)
583 583
     {
584
-        $applicant = Auth::user()->applicant;
585
-        $application = $this->getApplicationFromJob($jobPoster);
584
+        $applicant = Auth::user ()->applicant;
585
+        $application = $this->getApplicationFromJob ($jobPoster);
586 586
 
587 587
         // Ensure user has permissions to update this application.
588
-        $this->authorize('update', $application);
588
+        $this->authorize ('update', $application);
589 589
 
590
-        $skillDeclarations = $request->input('skill_declarations');
591
-        $claimedStatusId = SkillStatus::where('name', 'claimed')->firstOrFail()->id;
590
+        $skillDeclarations = $request->input ('skill_declarations');
591
+        $claimedStatusId = SkillStatus::where ('name', 'claimed')->firstOrFail ()->id;
592 592
 
593 593
         // Save new skill declarartions.
594 594
         if (isset($skillDeclarations['new'])) {
595 595
             foreach ($skillDeclarations['new'] as $skillType => $typeInput) {
596 596
                 foreach ($typeInput as $criterion_id => $skillDeclarationInput) {
597
-                    $skillDeclaration = new SkillDeclaration();
597
+                    $skillDeclaration = new SkillDeclaration ();
598 598
                     $skillDeclaration->applicant_id = $applicant->id;
599
-                    $skillDeclaration->skill_id = Criteria::find($criterion_id)->skill->id;
599
+                    $skillDeclaration->skill_id = Criteria::find ($criterion_id)->skill->id;
600 600
                     $skillDeclaration->skill_status_id = $claimedStatusId;
601
-                    $skillDeclaration->fill([
601
+                    $skillDeclaration->fill ([
602 602
                         'description' => $skillDeclarationInput['description'],
603 603
                         'skill_level_id' => isset($skillDeclarationInput['skill_level_id']) ? $skillDeclarationInput['skill_level_id'] : null,
604 604
                     ]);
605
-                    $skillDeclaration->save();
605
+                    $skillDeclaration->save ();
606 606
 
607
-                    $referenceIds = $this->getRelativeIds($skillDeclarationInput, 'references');
608
-                    $skillDeclaration->references()->sync($referenceIds);
607
+                    $referenceIds = $this->getRelativeIds ($skillDeclarationInput, 'references');
608
+                    $skillDeclaration->references ()->sync ($referenceIds);
609 609
 
610
-                    $sampleIds = $this->getRelativeIds($skillDeclarationInput, 'samples');
611
-                    $skillDeclaration->work_samples()->sync($sampleIds);
610
+                    $sampleIds = $this->getRelativeIds ($skillDeclarationInput, 'samples');
611
+                    $skillDeclaration->work_samples ()->sync ($sampleIds);
612 612
                 }
613 613
             }
614 614
         }
@@ -618,41 +618,41 @@  discard block
 block discarded – undo
618 618
             foreach ($skillDeclarations['old'] as $skillType => $typeInput) {
619 619
                 foreach ($typeInput as $id => $skillDeclarationInput) {
620 620
                     // Ensure this declaration belongs to this applicant.
621
-                    $skillDeclaration = $applicant->skill_declarations->firstWhere('id', $id);
621
+                    $skillDeclaration = $applicant->skill_declarations->firstWhere ('id', $id);
622 622
                     if ($skillDeclaration != null) {
623 623
                         // skill_id and skill_status cannot be changed.
624
-                        $skillDeclaration->fill([
624
+                        $skillDeclaration->fill ([
625 625
                             'description' => $skillDeclarationInput['description'],
626 626
                             'skill_level_id' => isset($skillDeclarationInput['skill_level_id']) ? $skillDeclarationInput['skill_level_id'] : null,
627 627
                         ]);
628
-                        $skillDeclaration->save();
628
+                        $skillDeclaration->save ();
629 629
 
630
-                        $referenceIds = $this->getRelativeIds($skillDeclarationInput, 'references');
631
-                        $skillDeclaration->references()->sync($referenceIds);
630
+                        $referenceIds = $this->getRelativeIds ($skillDeclarationInput, 'references');
631
+                        $skillDeclaration->references ()->sync ($referenceIds);
632 632
 
633
-                        $sampleIds = $this->getRelativeIds($skillDeclarationInput, 'samples');
634
-                        $skillDeclaration->work_samples()->sync($sampleIds);
633
+                        $sampleIds = $this->getRelativeIds ($skillDeclarationInput, 'samples');
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
             }
640 640
         }
641 641
 
642 642
         // Redirect to correct page.
643
-        switch ($request->input('submit')) {
643
+        switch ($request->input ('submit')) {
644 644
             case 'save_and_quit':
645
-                return redirect()->route('applications.index');
645
+                return redirect ()->route ('applications.index');
646 646
                 break;
647 647
             case 'save_and_continue':
648 648
             case 'next':
649
-                return redirect()->route('job.application.edit.4', $jobPoster);
649
+                return redirect ()->route ('job.application.edit.4', $jobPoster);
650 650
                 break;
651 651
             case 'previous':
652
-                return redirect()->route('job.application.edit.2', $jobPoster);
652
+                return redirect ()->route ('job.application.edit.2', $jobPoster);
653 653
                 break;
654 654
             default:
655
-                return redirect()->back()->withInput();
655
+                return redirect ()->back ()->withInput ();
656 656
         }
657 657
     }
658 658
 
@@ -665,34 +665,34 @@  discard block
 block discarded – undo
665 665
      */
666 666
     public function updateAssetSkills(Request $request, JobPoster $jobPoster)
667 667
     {
668
-        $applicant = Auth::user()->applicant;
669
-        $application = $this->getApplicationFromJob($jobPoster);
668
+        $applicant = Auth::user ()->applicant;
669
+        $application = $this->getApplicationFromJob ($jobPoster);
670 670
 
671 671
         // Ensure user has permissions to update this application.
672
-        $this->authorize('update', $application);
672
+        $this->authorize ('update', $application);
673 673
 
674
-        $skillDeclarations = $request->input('skill_declarations');
675
-        $claimedStatusId = SkillStatus::where('name', 'claimed')->firstOrFail()->id;
674
+        $skillDeclarations = $request->input ('skill_declarations');
675
+        $claimedStatusId = SkillStatus::where ('name', 'claimed')->firstOrFail ()->id;
676 676
 
677 677
         // Save new skill declarartions.
678 678
         if (isset($skillDeclarations['new'])) {
679 679
             foreach ($skillDeclarations['new'] as $skillType => $typeInput) {
680 680
                 foreach ($typeInput as $criterion_id => $skillDeclarationInput) {
681
-                    $skillDeclaration = new SkillDeclaration();
681
+                    $skillDeclaration = new SkillDeclaration ();
682 682
                     $skillDeclaration->applicant_id = $applicant->id;
683
-                    $skillDeclaration->skill_id = Criteria::find($criterion_id)->skill->id;
683
+                    $skillDeclaration->skill_id = Criteria::find ($criterion_id)->skill->id;
684 684
                     $skillDeclaration->skill_status_id = $claimedStatusId;
685
-                    $skillDeclaration->fill([
685
+                    $skillDeclaration->fill ([
686 686
                         'description' => $skillDeclarationInput['description'],
687 687
                         'skill_level_id' => isset($skillDeclarationInput['skill_level_id']) ? $skillDeclarationInput['skill_level_id'] : null,
688 688
                     ]);
689
-                    $skillDeclaration->save();
689
+                    $skillDeclaration->save ();
690 690
 
691
-                    $referenceIds = $this->getRelativeIds($skillDeclarationInput, 'references');
692
-                    $skillDeclaration->references()->sync($referenceIds);
691
+                    $referenceIds = $this->getRelativeIds ($skillDeclarationInput, 'references');
692
+                    $skillDeclaration->references ()->sync ($referenceIds);
693 693
 
694
-                    $sampleIds = $this->getRelativeIds($skillDeclarationInput, 'samples');
695
-                    $skillDeclaration->work_samples()->sync($sampleIds);
694
+                    $sampleIds = $this->getRelativeIds ($skillDeclarationInput, 'samples');
695
+                    $skillDeclaration->work_samples ()->sync ($sampleIds);
696 696
                 }
697 697
             }
698 698
         }
@@ -702,41 +702,41 @@  discard block
 block discarded – undo
702 702
             foreach ($skillDeclarations['old'] as $skillType => $typeInput) {
703 703
                 foreach ($typeInput as $id => $skillDeclarationInput) {
704 704
                     // Ensure this declaration belongs to this applicant.
705
-                    $skillDeclaration = $applicant->skill_declarations->firstWhere('id', $id);
705
+                    $skillDeclaration = $applicant->skill_declarations->firstWhere ('id', $id);
706 706
                     if ($skillDeclaration != null) {
707 707
                         // skill_id and skill_status cannot be changed.
708
-                        $skillDeclaration->fill([
708
+                        $skillDeclaration->fill ([
709 709
                             'description' => $skillDeclarationInput['description'],
710 710
                             'skill_level_id' => isset($skillDeclarationInput['skill_level_id']) ? $skillDeclarationInput['skill_level_id'] : null,
711 711
                         ]);
712
-                        $skillDeclaration->save();
712
+                        $skillDeclaration->save ();
713 713
 
714
-                        $referenceIds = $this->getRelativeIds($skillDeclarationInput, 'references');
715
-                        $skillDeclaration->references()->sync($referenceIds);
714
+                        $referenceIds = $this->getRelativeIds ($skillDeclarationInput, 'references');
715
+                        $skillDeclaration->references ()->sync ($referenceIds);
716 716
 
717
-                        $sampleIds = $this->getRelativeIds($skillDeclarationInput, 'samples');
718
-                        $skillDeclaration->work_samples()->sync($sampleIds);
717
+                        $sampleIds = $this->getRelativeIds ($skillDeclarationInput, 'samples');
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
             }
724 724
         }
725 725
 
726 726
         // Redirect to correct page.
727
-        switch ($request->input('submit')) {
727
+        switch ($request->input ('submit')) {
728 728
             case 'save_and_quit':
729
-                return redirect()->route('applications.index');
729
+                return redirect ()->route ('applications.index');
730 730
                 break;
731 731
             case 'save_and_continue':
732 732
             case 'next':
733
-                return redirect()->route('job.application.edit.5', $jobPoster);
733
+                return redirect ()->route ('job.application.edit.5', $jobPoster);
734 734
                 break;
735 735
             case 'previous':
736
-                return redirect()->route('job.application.edit.3', $jobPoster);
736
+                return redirect ()->route ('job.application.edit.3', $jobPoster);
737 737
                 break;
738 738
             default:
739
-                return redirect()->back()->withInput();
739
+                return redirect ()->back ()->withInput ();
740 740
         }
741 741
     }
742 742
 
@@ -749,15 +749,15 @@  discard block
 block discarded – undo
749 749
      */
750 750
     public function submit(Request $request, JobPoster $jobPoster)
751 751
     {
752
-        $applicant = Auth::user()->applicant;
753
-        $application = $this->getApplicationFromJob($jobPoster);
752
+        $applicant = Auth::user ()->applicant;
753
+        $application = $this->getApplicationFromJob ($jobPoster);
754 754
 
755 755
         // Ensure user has permissions to update this application.
756
-        $this->authorize('update', $application);
756
+        $this->authorize ('update', $application);
757 757
 
758 758
         // Only complete submission if submit button was pressed.
759
-        if ($request->input('submit') == 'submit') {
760
-            $request->validate([
759
+        if ($request->input ('submit') == 'submit') {
760
+            $request->validate ([
761 761
                 'submission_signature' => [
762 762
                     'required',
763 763
                     'string',
@@ -771,33 +771,33 @@  discard block
 block discarded – undo
771 771
             ]);
772 772
 
773 773
             // Save any final info.
774
-            $application->fill([
775
-                'submission_signature' => $request->input('submission_signature'),
776
-                'submission_date' => $request->input('submission_date'),
774
+            $application->fill ([
775
+                'submission_signature' => $request->input ('submission_signature'),
776
+                'submission_date' => $request->input ('submission_date'),
777 777
             ]);
778 778
 
779
-            $validator = new ApplicationValidator();
780
-            $validator->validate($application);
779
+            $validator = new ApplicationValidator ();
780
+            $validator->validate ($application);
781 781
 
782 782
             // Change status to 'submitted'.
783
-            $application->application_status_id = ApplicationStatus::where('name', 'submitted')->firstOrFail()->id;
783
+            $application->application_status_id = ApplicationStatus::where ('name', 'submitted')->firstOrFail ()->id;
784 784
         }
785 785
 
786
-        $application->save();
786
+        $application->save ();
787 787
 
788 788
         // Redirect to correct page.
789
-        switch ($request->input('submit')) {
789
+        switch ($request->input ('submit')) {
790 790
             case 'save_and_quit':
791
-                return redirect()->route('applications.index');
791
+                return redirect ()->route ('applications.index');
792 792
                 break;
793 793
             case 'submit':
794
-                return redirect()->route('job.application.complete', $jobPoster);
794
+                return redirect ()->route ('job.application.complete', $jobPoster);
795 795
                 break;
796 796
             case 'previous':
797
-                return redirect()->route('job.application.edit.4', $jobPoster);
797
+                return redirect ()->route ('job.application.edit.4', $jobPoster);
798 798
                 break;
799 799
             default:
800
-                return redirect()->back()->withInput();
800
+                return redirect ()->back ()->withInput ();
801 801
         }
802 802
     }
803 803
 }
Please login to merge, or discard this patch.
app/Http/Controllers/WorkSamplesController.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function editAuthenticated(Request $request)
21 21
     {
22
-        $applicant = $request->user()->applicant;
23
-        return redirect(route('profile.work_samples.edit', $applicant));
22
+        $applicant = $request->user ()->applicant;
23
+        return redirect (route ('profile.work_samples.edit', $applicant));
24 24
     }
25 25
 
26 26
     /**
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function edit(Request $request, Applicant $applicant)
34 34
     {
35
-        $applicant->load([
35
+        $applicant->load ([
36 36
             'work_samples',
37 37
             'skill_declarations.skill',
38 38
         ]);
39 39
 
40
-        return view('applicant/profile_05_portfolio', [
40
+        return view ('applicant/profile_05_portfolio', [
41 41
             'applicant' => $applicant,
42
-            'profile' => Lang::get('applicant/profile_work_samples'),
42
+            'profile' => Lang::get ('applicant/profile_work_samples'),
43 43
         ]);
44 44
     }
45 45
 
@@ -52,31 +52,31 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function update(Request $request, ?WorkSample $workSample = null)
54 54
     {
55
-        $validator = new UpdateWorkSampleValidator();
56
-        $validator->validate($request->input());
55
+        $validator = new UpdateWorkSampleValidator ();
56
+        $validator->validate ($request->input ());
57 57
 
58 58
         if ($workSample === null) {
59
-            $workSample = new WorkSample();
60
-            $workSample->applicant_id = $request->user()->applicant->id;
59
+            $workSample = new WorkSample ();
60
+            $workSample->applicant_id = $request->user ()->applicant->id;
61 61
         }
62
-        $workSample->fill([
63
-            'name' => $request->input('name'),
64
-            'file_type_id' => $request->input('file_type_id'),
65
-            'url' => $request->input('url'),
66
-            'description' => $request->input('description'),
62
+        $workSample->fill ([
63
+            'name' => $request->input ('name'),
64
+            'file_type_id' => $request->input ('file_type_id'),
65
+            'url' => $request->input ('url'),
66
+            'description' => $request->input ('description'),
67 67
         ]);
68
-        $workSample->save();
68
+        $workSample->save ();
69 69
 
70 70
         // Attach relatives.
71
-        $skillIds = $this->getRelativeIds($request->input(), 'skills');
72
-        $workSample->skill_declarations()->sync($skillIds);
71
+        $skillIds = $this->getRelativeIds ($request->input (), 'skills');
72
+        $workSample->skill_declarations ()->sync ($skillIds);
73 73
 
74 74
         // If an ajax request, return the new object.
75
-        if ($request->ajax()) {
76
-            $workSample->load('file_type');
77
-            return $workSample->toJson();
75
+        if ($request->ajax ()) {
76
+            $workSample->load ('file_type');
77
+            return $workSample->toJson ();
78 78
         } else {
79
-            return redirect()->back();
79
+            return redirect ()->back ();
80 80
         }
81 81
     }
82 82
 
@@ -89,16 +89,16 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function destroy(Request $request, WorkSample $workSample)
91 91
     {
92
-        $this->authorize('delete', $workSample);
92
+        $this->authorize ('delete', $workSample);
93 93
 
94
-        $workSample->delete();
94
+        $workSample->delete ();
95 95
 
96
-        if ($request->ajax()) {
96
+        if ($request->ajax ()) {
97 97
             return [
98 98
                 'message' => 'Work sample deleted'
99 99
             ];
100 100
         }
101 101
 
102
-        return redirect()->back();
102
+        return redirect ()->back ();
103 103
     }
104 104
 }
Please login to merge, or discard this patch.
app/Console/Kernel.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
         //          ->hourly();
29 29
 
30 30
         // start the queue daemon, if its not running
31
-        if (!$this->osProcessIsRunning('queue:work')) {
32
-            $schedule->command('queue:work')->everyMinute();
31
+        if (!$this->osProcessIsRunning ('queue:work')) {
32
+            $schedule->command ('queue:work')->everyMinute ();
33 33
         }
34 34
     }
35 35
 
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
      */
41 41
     protected function commands(): void
42 42
     {
43
-        $this->load(__DIR__.'/Commands');
43
+        $this->load (__DIR__.'/Commands');
44 44
 
45
-        require base_path('routes/console.php');
45
+        require base_path ('routes/console.php');
46 46
     }
47 47
 
48 48
     /**
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
     protected function osProcessIsRunning(string $needle): bool
55 55
     {
56 56
         // get process status. the "-ww"-option is important to get the full output!
57
-        exec('ps aux -ww', $process_status);
57
+        exec ('ps aux -ww', $process_status);
58 58
 
59 59
 
60 60
         // search $needle in process status
61
-        $result = array_filter(
61
+        $result = array_filter (
62 62
             $process_status,
63 63
             function ($var) use ($needle) {
64
-                return strpos($var, $needle);
64
+                return strpos ($var, $needle);
65 65
             }
66 66
         );
67 67
 
Please login to merge, or discard this patch.
app/Services/WhichPortal.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,34 +10,34 @@
 block discarded – undo
10 10
 
11 11
     public function isApplicantPortal()
12 12
     {
13
-        return !$this->isManagerPortal() && !$this->isAdminPortal();
13
+        return !$this->isManagerPortal () && !$this->isAdminPortal ();
14 14
     }
15 15
 
16 16
     public function isManagerPortal()
17 17
     {
18
-        $url = URL::current();
19
-        return $this->urlIsManagerPortal($url);
18
+        $url = URL::current ();
19
+        return $this->urlIsManagerPortal ($url);
20 20
     }
21 21
 
22 22
     public function isAdminPortal()
23 23
     {
24
-        $url = URL::current();
25
-        return $this->urlIsAdminPortal($url);
24
+        $url = URL::current ();
25
+        return $this->urlIsAdminPortal ($url);
26 26
     }
27 27
 
28 28
     public function urlIsManagerPortal($url): bool
29 29
     {
30
-        $baseUrl = config('app.url');
31
-        $managerPrefix = config('app.manager_prefix');
30
+        $baseUrl = config ('app.url');
31
+        $managerPrefix = config ('app.manager_prefix');
32 32
         $managerPattern = "#^$baseUrl/(\w+/)?$managerPrefix(/.*)?$#";
33
-        return preg_match($managerPattern, $url);
33
+        return preg_match ($managerPattern, $url);
34 34
     }
35 35
 
36 36
     public function urlIsAdminPortal($url): bool
37 37
     {
38
-        $baseUrl = config('app.url');
39
-        $adminPrefix = config('backpack.base.route_prefix', 'admin');
38
+        $baseUrl = config ('app.url');
39
+        $adminPrefix = config ('backpack.base.route_prefix', 'admin');
40 40
         $adminPattern = "#^$baseUrl/(\w+/)?$adminPrefix(/.*)?$#";
41
-        return preg_match($adminPattern, $url);
41
+        return preg_match ($adminPattern, $url);
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
app/Services/Validation/RegistrationValidator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public static function userValidator(array $data)
40 40
     {
41
-        return Validator::make($data, self::basicRules());
41
+        return Validator::make ($data, self::basicRules ());
42 42
     }
43 43
 
44 44
     /**
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public static function managerValidator(array $data)
51 51
     {
52
-        $managerRules = array_merge(self::basicRules(), self::managerRegistrationExtraRules());
53
-        return Validator::make($data, $managerRules);
52
+        $managerRules = array_merge (self::basicRules (), self::managerRegistrationExtraRules ());
53
+        return Validator::make ($data, $managerRules);
54 54
     }
55 55
 
56 56
     /**
@@ -61,6 +61,6 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public static function finalizeManagerValidator(array $data)
63 63
     {
64
-        return Validator::make($data, self::managerRegistrationExtraRules());
64
+        return Validator::make ($data, self::managerRegistrationExtraRules ());
65 65
     }
66 66
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/PasswordCorrectRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 {
12 12
     public function passes($attribute, $value)
13 13
     {
14
-        return Hash::check($value, Auth::user()->getAuthPassword());
14
+        return Hash::check ($value, Auth::user ()->getAuthPassword ());
15 15
     }
16 16
 
17 17
     public function message()
18 18
     {
19
-        return Lang::get('validation.password_correct');
19
+        return Lang::get ('validation.password_correct');
20 20
     }
21 21
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/ValidIdRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function passes($attribute, $value)
35 35
     {
36 36
         $model = $this->className;
37
-        return $model::where('id', $value)->exists();
37
+        return $model::where ('id', $value)->exists ();
38 38
     }
39 39
 
40 40
     /**
@@ -44,6 +44,6 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function message()
46 46
     {
47
-        return Lang::get('validation.invalid_id');
47
+        return Lang::get ('validation.invalid_id');
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/LinkedInUrlRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function passes($attribute, $value)
25 25
     {
26
-        return preg_match('/' . self::PATTERN . '/', $value);
26
+        return preg_match ('/'.self::PATTERN.'/', $value);
27 27
     }
28 28
 
29 29
     /**
@@ -33,6 +33,6 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function message()
35 35
     {
36
-        return Lang::get('validation.custom.linkedin_url');
36
+        return Lang::get ('validation.custom.linkedin_url');
37 37
     }
38 38
 }
Please login to merge, or discard this patch.