@@ -23,12 +23,12 @@ discard block |
||
23 | 23 | $user_id = $user->id; |
24 | 24 | return JobPoster::whereHas( |
25 | 25 | 'manager', |
26 | - function ($q) use ($user_id) { |
|
26 | + function($q) use ($user_id) { |
|
27 | 27 | $q->where('user_id', $user_id); |
28 | 28 | } |
29 | 29 | )->whereHas( |
30 | 30 | 'submitted_applications', |
31 | - function ($q) use ($applicant_id) { |
|
31 | + function($q) use ($applicant_id) { |
|
32 | 32 | $q->where('applicant_id', $applicant_id); |
33 | 33 | } |
34 | 34 | )->get()->isNotEmpty(); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function view(User $user, Applicant $applicant) |
45 | 45 | { |
46 | - $authApplicant = $user->isApplicant() && |
|
46 | + $authApplicant = $user->isApplicant() && |
|
47 | 47 | $applicant->user->is($user); |
48 | 48 | $authManager = $user->isManager() && $this->ownsJobApplicantAppliedTo($user, $applicant); |
49 | 49 | return $authApplicant || $authManager; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $authManager = ($user->isManager() && |
26 | 26 | $jobApplication->job_poster->manager->user->is($user)); |
27 | 27 | |
28 | - return $authApplicant||$authManager; |
|
28 | + return $authApplicant || $authManager; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | factory(JobPoster::class, 3)->state('published')->create([ |
62 | 62 | 'manager_id' => $managerUser->manager->id |
63 | - ])->each(function ($job) : void { |
|
63 | + ])->each(function($job) : void { |
|
64 | 64 | $job->job_applications()->saveMany(factory(JobApplication::class, 5))->create([ |
65 | 65 | 'job_poster_id' => $job->id |
66 | 66 | ]); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | }); |
75 | 75 | factory(JobPoster::class, 3)->state('closed')->create([ |
76 | 76 | 'manager_id' => $managerUser->manager->id |
77 | - ])->each(function ($job) : void { |
|
77 | + ])->each(function($job) : void { |
|
78 | 78 | $job->job_applications()->saveMany(factory(JobApplication::class, 5))->create([ |
79 | 79 | 'job_poster_id' => $job->id |
80 | 80 | ]); |
@@ -9,7 +9,7 @@ |
||
9 | 9 | 'prefix' => config('backpack.base.route_prefix', 'admin'), |
10 | 10 | 'middleware' => ['web', config('backpack.base.middleware_key', 'admin')], |
11 | 11 | 'namespace' => 'App\Http\Controllers\Admin', |
12 | -], function () : void { |
|
12 | +], function() : void { |
|
13 | 13 | // Custom admin routes. |
14 | 14 | Route::crud('skill', 'SkillCrudController'); |
15 | 15 | Route::crud('job-poster', 'JobPosterCrudController'); |
@@ -480,7 +480,7 @@ |
||
480 | 480 | ->middleware('can:update,jobPoster'); |
481 | 481 | |
482 | 482 | |
483 | - Route::get('jobs/{jobPoster}/criteria', 'Api\CriteriaController@indexByJob') |
|
483 | + Route::get('jobs/{jobPoster}/criteria', 'Api\CriteriaController@indexByJob') |
|
484 | 484 | ->where('jobPoster', '[0-9]+') |
485 | 485 | ->middleware('can:view,jobPoster'); |
486 | 486 | Route::put('jobs/{jobPoster}/criteria', 'Api\CriteriaController@batchUpdate') |
@@ -18,10 +18,10 @@ discard block |
||
18 | 18 | 'prefix' => LaravelLocalization::setLocale(), |
19 | 19 | 'middleware' => ['localeSessionRedirect', 'localizationRedirect', 'localeViewPath'] |
20 | 20 | ], |
21 | - function () : void { |
|
21 | + function() : void { |
|
22 | 22 | /** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/ |
23 | 23 | |
24 | - Route::group(['prefix' => 'demo'], function () : void { |
|
24 | + Route::group(['prefix' => 'demo'], function() : void { |
|
25 | 25 | |
26 | 26 | /* Temporary Blog Index */ |
27 | 27 | Route::view('blog', 'common/blog-index')->middleware('localOnly')->name('blog'); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | }); |
52 | 52 | |
53 | 53 | |
54 | - Route::group(['prefix' => config('app.applicant_prefix')], function () : void { |
|
54 | + Route::group(['prefix' => config('app.applicant_prefix')], function() : void { |
|
55 | 55 | |
56 | 56 | /* Home */ |
57 | 57 | Route::get('/', 'HomepageController@applicant')->name('home'); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | ->name('jobs.show'); |
65 | 65 | |
66 | 66 | /* Require being logged in */ |
67 | - Route::middleware(['auth'])->group(function () : void { |
|
67 | + Route::middleware(['auth'])->group(function() : void { |
|
68 | 68 | /* Managers */ |
69 | 69 | Route::get('managers/{manager}', 'ManagerProfileController@show') |
70 | 70 | ->middleware('can:view,manager') |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | }); |
73 | 73 | |
74 | 74 | /* Require being logged in as applicant */ |
75 | - Route::middleware(['auth', 'role:applicant'])->group(function () : void { |
|
75 | + Route::middleware(['auth', 'role:applicant'])->group(function() : void { |
|
76 | 76 | |
77 | 77 | // Application permissions are handled within the controller instead of with middleware |
78 | 78 | /* Applications */ |
@@ -207,9 +207,9 @@ discard block |
||
207 | 207 | |
208 | 208 | Route::group([ |
209 | 209 | 'prefix' => config('app.manager_prefix'), |
210 | - ], function (): void { |
|
210 | + ], function(): void { |
|
211 | 211 | |
212 | - Route::middleware(['finishManagerRegistration'])->group(function (): void { |
|
212 | + Route::middleware(['finishManagerRegistration'])->group(function(): void { |
|
213 | 213 | |
214 | 214 | /* Home */ |
215 | 215 | Route::get('/', 'HomepageController@manager')->name('manager.home'); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | 'ManagerProfileController@faq' |
226 | 226 | )->name('manager.faq.section'); |
227 | 227 | |
228 | - Route::middleware(['auth', 'role:manager'])->group(function (): void { |
|
228 | + Route::middleware(['auth', 'role:manager'])->group(function(): void { |
|
229 | 229 | |
230 | 230 | Route::get('profile', 'ManagerProfileController@editAuthenticated')->name('manager.profile'); |
231 | 231 | |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | }); |
323 | 323 | |
324 | 324 | // These routes must be excluded from the finishManagerRegistration middleware to avoid an infinite loop of redirects |
325 | - Route::middleware(['auth', 'role:manager'])->group(function (): void { |
|
325 | + Route::middleware(['auth', 'role:manager'])->group(function(): void { |
|
326 | 326 | Route::get('first-visit', 'Auth\FirstVisitController@showFirstVisitManagerForm') |
327 | 327 | ->name('manager.first_visit'); |
328 | 328 | Route::post('finish_registration', 'Auth\FirstVisitController@finishManagerRegistration') |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | /* AJAX calls =============================================================== */ |
349 | 349 | |
350 | 350 | /* Require being logged in */ |
351 | - Route::middleware(['auth'])->group(function () : void { |
|
351 | + Route::middleware(['auth'])->group(function() : void { |
|
352 | 352 | |
353 | 353 | Route::delete('courses/{course}', 'CourseController@destroy') |
354 | 354 | ->middleware('can:delete,course') |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | 'prefix' => 'admin', |
415 | 415 | 'middleware' => ['auth', 'role:admin'] |
416 | 416 | ], |
417 | - function (): void { |
|
417 | + function(): void { |
|
418 | 418 | /* Edit Job */ |
419 | 419 | Route::get('jobs/{jobPoster}/edit', 'JobController@edit') |
420 | 420 | ->where('jobPoster', '[0-9]+') |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | 'prefix' => 'admin', |
436 | 436 | 'middleware' => ['auth', 'role:admin'] |
437 | 437 | ], |
438 | - function (): void { |
|
438 | + function(): void { |
|
439 | 439 | // This page is non-localized, because the middleware that redirects to localized pages changes POSTs to GETs and messes up the request. |
440 | 440 | Route::post('jobs/create/as-manager/{manager}', 'JobController@createAsManager') |
441 | 441 | ->middleware('can:create,App\Models\JobPoster') |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | |
450 | 450 | |
451 | 451 | /** API routes - currently using same default http auth, but not localized */ |
452 | -Route::group(['prefix' => 'api'], function (): void { |
|
452 | +Route::group(['prefix' => 'api'], function(): void { |
|
453 | 453 | // Protected by a gate in the controller, instead of policy middleware |
454 | 454 | Route::get('jobs/{jobPoster}/assessment-plan', 'AssessmentPlanController@getForJob'); |
455 | 455 | // Public, not protected by policy or gate |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | ->name('api.jobs.submit'); |
495 | 495 | Route::resource('jobs', 'Api\JobController')->only([ |
496 | 496 | 'show', 'store', 'update' |
497 | - ])->names([ // Specify custom names because default names collied with existing routes. |
|
497 | + ])->names([// Specify custom names because default names collied with existing routes. |
|
498 | 498 | 'show' => 'api.jobs.show', |
499 | 499 | 'store' => 'api.jobs.store', |
500 | 500 | 'update' => 'api.jobs.update' |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | |
503 | 503 | Route::resource('managers', 'Api\ManagerController')->only([ |
504 | 504 | 'show', 'update' |
505 | - ])->names([ // Specify custom names because default names collied with existing routes |
|
505 | + ])->names([// Specify custom names because default names collied with existing routes |
|
506 | 506 | 'show' => 'api.managers.show', |
507 | 507 | 'update' => 'api.managers.update' |
508 | 508 | ]); |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | */ |
367 | 367 | public function submitted_applications() // phpcs:ignore |
368 | 368 | { |
369 | - return $this->hasMany(\App\Models\JobApplication::class)->whereDoesntHave('application_status', function ($query): void { |
|
369 | + return $this->hasMany(\App\Models\JobApplication::class)->whereDoesntHave('application_status', function($query): void { |
|
370 | 370 | $query->where('name', 'draft'); |
371 | 371 | }); |
372 | 372 | } |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | public function getClassificationMessageAttribute() |
556 | 556 | { |
557 | 557 | if ($this->classification_id !== null && $this->classification_level !== null) { |
558 | - return $this->classification->key . '-0' . $this->classification_level; |
|
558 | + return $this->classification->key.'-0'.$this->classification_level; |
|
559 | 559 | } |
560 | 560 | return null; |
561 | 561 | } |
@@ -187,7 +187,7 @@ |
||
187 | 187 | public function getFullNameAttribute(): string |
188 | 188 | { |
189 | 189 | if ($this->user !== null) { |
190 | - return $this->user->first_name . ' ' . $this->user->last_name; |
|
190 | + return $this->user->first_name.' '.$this->user->last_name; |
|
191 | 191 | } |
192 | 192 | return ''; |
193 | 193 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | //Log when application is first created |
41 | - if($application->wasRecentlyCreated) { |
|
41 | + if ($application->wasRecentlyCreated) { |
|
42 | 42 | $applicationText = "{id=".$application->id.", status=".$application->application_status->name."}"; |
43 | 43 | |
44 | 44 | Log::notice("Application created: application ".$applicationText." has been created by user ".$userText); |
@@ -23,7 +23,7 @@ |
||
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 | /** |