Passed
Push — task/common-translation-packag... ( 2abece...256e02 )
by Chris
07:03
created
routes/web.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -480,7 +480,7 @@
 block discarded – undo
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')
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     ]);
Please login to merge, or discard this patch.
database/factories/UserFactory.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
 
24 24
 $faker_fr = Faker\Factory::create('fr');
25 25
 
26
-$factory->define(User::class, function (Faker\Generator $faker) {
26
+$factory->define(User::class, function(Faker\Generator $faker){
27 27
     static $password;
28 28
 
29 29
     return [
30 30
         'first_name' => $faker->firstName(),
31 31
         'last_name' => $faker->lastName(),
32 32
         'email' => $faker->unique()->safeEmail(),
33
-        'password' => $password ? : $password = Hash::make('password'),
33
+        'password' => $password ?: $password = Hash::make('password'),
34 34
         'is_confirmed' => 1,
35 35
         'user_role_id' => UserRole::where('name', 'basic')->first()->id, // Users should default to basic user role.
36 36
         'remember_token' => str_random(10),
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     ];
39 39
 });
40 40
 
41
-$factory->state(User::class, 'upgradedManager', function (Faker\Generator $faker) {
41
+$factory->state(User::class, 'upgradedManager', function(Faker\Generator $faker){
42 42
     return [
43 43
         'user_role_id' => UserRole::where('name', 'upgradedManager')->first()->id,
44 44
         'gov_email' => $faker->unique()->safeEmail(),
@@ -57,20 +57,20 @@  discard block
 block discarded – undo
57 57
     'is_priority' => true
58 58
 ]);
59 59
 
60
-$factory->define(Applicant::class, function (Faker\Generator $faker) {
60
+$factory->define(Applicant::class, function(Faker\Generator $faker){
61 61
     return [
62 62
         'twitter_username' => $faker->firstName(),
63 63
         'linkedin_url' => null,
64 64
         'tagline' => $faker->paragraph(),
65 65
         'personal_website' => $faker->url(),
66 66
         'is_snapshot' => false,
67
-        'user_id' => function () {
67
+        'user_id' => function(){
68 68
             return factory(User::class)->states('applicant')->create()->id;
69 69
         },
70 70
     ];
71 71
 });
72 72
 
73
-$factory->define(Manager::class, function (Faker\Generator $faker) use ($faker_fr) {
73
+$factory->define(Manager::class, function(Faker\Generator $faker) use ($faker_fr) {
74 74
     return [
75 75
         'twitter_username' => $faker->firstName(),
76 76
         'linkedin_url' => null,
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         'development_opportunity_frequency_id' => Frequency::inRandomOrder()->first()->id,
82 82
         'refuse_low_value_work_frequency_id' => Frequency::inRandomOrder()->first()->id,
83 83
         'years_experience' => $faker->numberBetween(2, 25),
84
-        'user_id' => function () use ($faker) {
84
+        'user_id' => function() use ($faker) {
85 85
             return factory(User::class)->create([
86 86
                 'gov_email' => $faker->unique()->safeEmail(),
87 87
             ])->id;
@@ -110,12 +110,12 @@  discard block
 block discarded – undo
110 110
 });
111 111
 
112 112
 $factory->state(Manager::class, 'upgraded', [
113
-    'user_id' => function () {
113
+    'user_id' => function(){
114 114
         return factory(User::class)->state('upgradedManager')->create()->id;
115 115
     },
116 116
 ]);
117 117
 
118
-$factory->afterCreating(Manager::class, function ($manager) : void {
118
+$factory->afterCreating(Manager::class, function($manager) : void {
119 119
     $manager->team_culture()->save(factory(TeamCulture::class)->create([
120 120
         'manager_id' => $manager->id,
121 121
     ]));
Please login to merge, or discard this patch.
app/Models/JobPoster.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Models/Manager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Listeners/ApplicationStatusChanged.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
app/Services/Validation/Rules/LinkedInUrlRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 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
     /**
Please login to merge, or discard this patch.
app/Console/Kernel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                 'user' => request()->user(),
69 69
                 'requestUrl' => request()->url()
70 70
             ];
71
-            $message = '419 CSRF Token Mismatch. ' . collect($logData)->toJson();
71
+            $message = '419 CSRF Token Mismatch. '.collect($logData)->toJson();
72 72
             Log::debug($message);
73 73
         }
74 74
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             return $exception->render($request);
110 110
         }
111 111
         if ($exception instanceof TokenMismatchException) {
112
-            $newMessage = $exception->getMessage() . ' ' . Lang::get('errors.refresh_page');
112
+            $newMessage = $exception->getMessage().' '.Lang::get('errors.refresh_page');
113 113
             $modifiedException = new TokenMismatchException($newMessage, $exception->getCode(), $exception);
114 114
             return parent::render($request, $modifiedException);
115 115
         }
Please login to merge, or discard this patch.
app/Http/Requests/StoreRatingGuideAnswer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     {
20 20
         // Ensure the user can make answers, question exists, and user is the owner of the question it answers.
21 21
         if ($this->user()->can('create', RatingGuideAnswer::class)) {
22
-            $questionId = (int) $this->input('rating_guide_question_id');
22
+            $questionId = (int)$this->input('rating_guide_question_id');
23 23
             if ($questionId) {
24 24
                 $question = RatingGuideQuestion::find($questionId);
25 25
                 return $question && $this->user()->can('update', $question);
Please login to merge, or discard this patch.