Passed
Push — chore/format-php ( 5ef121 )
by Grant
16:21
created
database/factories/UserFactory.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  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 [
@@ -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;
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
 });
131 131
 
132 132
 $factory->state(Manager::class, 'upgraded', [
133
-    'user_id' => function () {
133
+    'user_id' => function(){
134 134
         return factory(User::class)->state('upgradedManager')->create()->id;
135 135
     },
136 136
 ]);
137 137
 
138
-$factory->afterCreating(Manager::class, function ($manager) : void {
138
+$factory->afterCreating(Manager::class, function($manager) : void {
139 139
     $manager->team_culture()->save(factory(TeamCulture::class)->create([
140 140
         'manager_id' => $manager->id,
141 141
     ]));
Please login to merge, or discard this patch.
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  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 [
@@ -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;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 });
131 131
 
132 132
 $factory->state(Manager::class, 'upgraded', [
133
-    'user_id' => function () {
133
+    'user_id' => function (){
134 134
         return factory(User::class)->state('upgradedManager')->create()->id;
135 135
     },
136 136
 ]);
Please login to merge, or discard this patch.
database/factories/ApplicationFactory.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@  discard block
 block discarded – undo
10 10
 use App\Models\JobApplicationAnswer;
11 11
 use App\Models\SkillDeclaration;
12 12
 
13
-$factory->define(JobApplication::class, function (Faker\Generator $faker) {
13
+$factory->define(JobApplication::class, function(Faker\Generator $faker){
14 14
     return [
15
-        'job_poster_id' => function () {
15
+        'job_poster_id' => function(){
16 16
             return factory(JobPoster::class)->states('published')->create()->id;
17 17
         },
18 18
         'application_status_id' => ApplicationStatus::where('name', 'submitted')->firstOrFail()->id,
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         'preferred_language_id' => PreferredLanguage::inRandomOrder()->first()->id,
22 22
         'submission_signature' => $faker->name(),
23 23
         'submission_date' => $faker->dateTimeBetween('yesterday', 'tomorrow')->format('Y-m-d H:i:s'),
24
-        'applicant_id' => function () {
24
+        'applicant_id' => function(){
25 25
             return factory(Applicant::class)->create()->id;
26 26
         }
27 27
     ];
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     'submission_date' => null
34 34
 ]);
35 35
 
36
-$factory->afterCreating(JobApplication::class, function ($application) : void {
36
+$factory->afterCreating(JobApplication::class, function($application) : void {
37 37
     foreach ($application->job_poster->job_poster_questions as $question) {
38 38
         $answer = factory(JobApplicationAnswer::class)->create([
39 39
             'job_poster_question_id' => $question->id,
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@  discard block
 block discarded – undo
10 10
 use App\Models\JobApplicationAnswer;
11 11
 use App\Models\SkillDeclaration;
12 12
 
13
-$factory->define(JobApplication::class, function (Faker\Generator $faker) {
13
+$factory->define(JobApplication::class, function (Faker\Generator $faker){
14 14
     return [
15
-        'job_poster_id' => function () {
15
+        'job_poster_id' => function (){
16 16
             return factory(JobPoster::class)->states('published')->create()->id;
17 17
         },
18 18
         'application_status_id' => ApplicationStatus::where('name', 'submitted')->firstOrFail()->id,
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         'preferred_language_id' => PreferredLanguage::inRandomOrder()->first()->id,
22 22
         'submission_signature' => $faker->name(),
23 23
         'submission_date' => $faker->dateTimeBetween('yesterday', 'tomorrow')->format('Y-m-d H:i:s'),
24
-        'applicant_id' => function () {
24
+        'applicant_id' => function (){
25 25
             return factory(Applicant::class)->create()->id;
26 26
         }
27 27
     ];
Please login to merge, or discard this patch.
database/factories/AssessmentFactory.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@
 block discarded – undo
6 6
 use App\Models\RatingGuideQuestion;
7 7
 use App\Models\RatingGuideAnswer;
8 8
 
9
-$factory->define(Assessment::class, function (Faker\Generator $faker) {
9
+$factory->define(Assessment::class, function(Faker\Generator $faker){
10 10
     return [
11
-        'criterion_id' => function () {
11
+        'criterion_id' => function(){
12 12
             return factory(Criteria::class)->create()->id;
13 13
         },
14 14
         'assessment_type_id' => AssessmentType::inRandomOrder()->first()->id,
15 15
     ];
16 16
 });
17 17
 
18
-$factory->afterMakingState(Assessment::class, 'withRatingGuide', function ($assessment, $faker): void {
18
+$factory->afterMakingState(Assessment::class, 'withRatingGuide', function($assessment, $faker): void {
19 19
     // Create a RatingGuideQuestion, and an accompanying RatingGuideAnswer
20 20
     $question = factory(RatingGuideQuestion::class)->create([
21 21
         'job_poster_id' => $assessment->criterion->job_poster_id,
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
 use App\Models\RatingGuideQuestion;
7 7
 use App\Models\RatingGuideAnswer;
8 8
 
9
-$factory->define(Assessment::class, function (Faker\Generator $faker) {
9
+$factory->define(Assessment::class, function (Faker\Generator $faker){
10 10
     return [
11
-        'criterion_id' => function () {
11
+        'criterion_id' => function (){
12 12
             return factory(Criteria::class)->create()->id;
13 13
         },
14 14
         'assessment_type_id' => AssessmentType::inRandomOrder()->first()->id,
Please login to merge, or discard this patch.
database/factories/JobApplicationAnswerFactory.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
 use App\Models\JobApplication;
6 6
 use App\Models\JobApplicationAnswer;
7 7
 
8
-$factory->define(JobApplicationAnswer::class, function (Faker\Generator $faker) {
8
+$factory->define(JobApplicationAnswer::class, function(Faker\Generator $faker){
9 9
     return [
10
-        'job_poster_question_id' => function () {
10
+        'job_poster_question_id' => function(){
11 11
             return factory(JobPosterQuestion::class)->create()->id;
12 12
         },
13
-        'job_application_id' => function () {
13
+        'job_application_id' => function(){
14 14
             return factory(JobApplication::class)->create()->id;
15 15
         },
16 16
         'answer' => $faker->paragraph()
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
 use App\Models\JobApplication;
6 6
 use App\Models\JobApplicationAnswer;
7 7
 
8
-$factory->define(JobApplicationAnswer::class, function (Faker\Generator $faker) {
8
+$factory->define(JobApplicationAnswer::class, function (Faker\Generator $faker){
9 9
     return [
10
-        'job_poster_question_id' => function () {
10
+        'job_poster_question_id' => function (){
11 11
             return factory(JobPosterQuestion::class)->create()->id;
12 12
         },
13
-        'job_application_id' => function () {
13
+        'job_application_id' => function (){
14 14
             return factory(JobApplication::class)->create()->id;
15 15
         },
16 16
         'answer' => $faker->paragraph()
Please login to merge, or discard this patch.
database/factories/ReferenceFactory.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 block discarded – undo
6 6
 use App\Models\Applicant;
7 7
 use App\Models\Project;
8 8
 
9
-$factory->define(Reference::class, function (Faker $faker) {
9
+$factory->define(Reference::class, function(Faker $faker){
10 10
     return [
11 11
         'name' => $faker->name(),
12 12
         'email' => $faker->safeEmail(),
13 13
         'description' => $faker->paragraphs(2, true),
14 14
         'relationship_id' => Relationship::inRandomOrder()->first()->id,
15
-        'applicant_id' => function () {
15
+        'applicant_id' => function(){
16 16
             return factory(Applicant::class)->create()->id;
17 17
         },
18 18
     ];
19 19
 });
20 20
 
21
-$factory->define(Project::class, function (Faker $faker) {
21
+$factory->define(Project::class, function(Faker $faker){
22 22
     return [
23 23
         'name' => $faker->sentence(),
24 24
         'start_date' => $faker->dateTimeBetween('-3 years', '-1 years'),
25 25
         'end_date' => $faker->dateTimeBetween('-1 years', '-1 day'),
26
-        'applicant_id' => function () {
26
+        'applicant_id' => function(){
27 27
             return factory(Applicant::class)->create()->id;
28 28
         },
29 29
     ];
30 30
 });
31 31
 
32
-$factory->afterCreating(Reference::class, function ($reference) : void {
32
+$factory->afterCreating(Reference::class, function($reference) : void {
33 33
     $reference->projects()->saveMany(factory(Project::class, 3)->make([
34 34
         'applicant_id' => $reference->applicant_id
35 35
     ]));
Please login to merge, or discard this patch.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,24 +6,24 @@
 block discarded – undo
6 6
 use App\Models\Applicant;
7 7
 use App\Models\Project;
8 8
 
9
-$factory->define(Reference::class, function (Faker $faker) {
9
+$factory->define(Reference::class, function (Faker $faker){
10 10
     return [
11 11
         'name' => $faker->name(),
12 12
         'email' => $faker->safeEmail(),
13 13
         'description' => $faker->paragraphs(2, true),
14 14
         'relationship_id' => Relationship::inRandomOrder()->first()->id,
15
-        'applicant_id' => function () {
15
+        'applicant_id' => function (){
16 16
             return factory(Applicant::class)->create()->id;
17 17
         },
18 18
     ];
19 19
 });
20 20
 
21
-$factory->define(Project::class, function (Faker $faker) {
21
+$factory->define(Project::class, function (Faker $faker){
22 22
     return [
23 23
         'name' => $faker->sentence(),
24 24
         'start_date' => $faker->dateTimeBetween('-3 years', '-1 years'),
25 25
         'end_date' => $faker->dateTimeBetween('-1 years', '-1 day'),
26
-        'applicant_id' => function () {
26
+        'applicant_id' => function (){
27 27
             return factory(Applicant::class)->create()->id;
28 28
         },
29 29
     ];
Please login to merge, or discard this patch.
database/factories/RatingGuideAnswerFactory.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 use App\Models\Skill;
6 6
 use App\Models\Criteria;
7 7
 
8
-$factory->define(RatingGuideAnswer::class, function (Faker\Generator $faker) {
8
+$factory->define(RatingGuideAnswer::class, function(Faker\Generator $faker){
9 9
     return [
10
-        'rating_guide_question_id' => function () {
10
+        'rating_guide_question_id' => function(){
11 11
             return factory(RatingGuideQuestion::class)->create()->id;
12 12
         },
13 13
         'criterion_id' => null,
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 use App\Models\Skill;
6 6
 use App\Models\Criteria;
7 7
 
8
-$factory->define(RatingGuideAnswer::class, function (Faker\Generator $faker) {
8
+$factory->define(RatingGuideAnswer::class, function (Faker\Generator $faker){
9 9
     return [
10
-        'rating_guide_question_id' => function () {
10
+        'rating_guide_question_id' => function (){
11 11
             return factory(RatingGuideQuestion::class)->create()->id;
12 12
         },
13 13
         'criterion_id' => null,
Please login to merge, or discard this patch.
database/seeds/DevSeeder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             ]);
Please login to merge, or discard this patch.
database/seeds/SkillClassificationSeeder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
 
19 19
         foreach ($skills as $skill) {
20 20
             $skill->classifications()->attach(Classification::inRandomOrder()->first());
21
-            $skill->is_culture_skill = (bool)random_int(0, 1);
22
-            $skill->is_future_skill = (bool)random_int(0, 1);
21
+            $skill->is_culture_skill = (bool) random_int(0, 1);
22
+            $skill->is_future_skill = (bool) random_int(0, 1);
23 23
             $skill->save();
24 24
         }
25 25
     }
Please login to merge, or discard this patch.
routes/backpack/custom.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.