Passed
Push — feature/immutable-application-... ( d4dc87...b29460 )
by Grant
08:27
created
database/factories/WorkExperienceFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,14 +4,14 @@
 block discarded – undo
4 4
 use App\Models\Applicant;
5 5
 use App\Models\WorkExperience;
6 6
 
7
-$factory->define(WorkExperience::class, function (Faker $faker) {
7
+$factory->define(WorkExperience::class, function(Faker $faker) {
8 8
     return [
9 9
         'role' => $faker->word(),
10 10
         'company' => $faker->company(),
11 11
         'description' => $faker->paragraph(),
12 12
         'start_date' => $faker->dateTimeBetween('-3 years', '-1 years'),
13 13
         'end_date' => $faker->dateTimeBetween('-1 years', '-1 day'),
14
-        'experienceable_id' => function () {
14
+        'experienceable_id' => function() {
15 15
             // Factory items to belong to Applicant by default, not JobApplication
16 16
             return factory(Applicant::class)->create()->id;
17 17
         },
Please login to merge, or discard this patch.
database/factories/CourseFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@
 block discarded – undo
5 5
 use App\Models\Course;
6 6
 use App\Models\Lookup\CourseStatus;
7 7
 
8
-$factory->define(Course::class, function (Faker $faker) {
8
+$factory->define(Course::class, function(Faker $faker) {
9 9
     return [
10 10
         'name' => $faker->word(),
11 11
         'institution' => $faker->company(),
12 12
         'course_status_id' => CourseStatus::inRandomOrder()->first()->id,
13 13
         'start_date' => $faker->dateTimeBetween('-3 years', '-1 years'),
14 14
         'end_date' => $faker->dateTimeBetween('-1 years', '-1 day'),
15
-        'courseable_id' => function () {
15
+        'courseable_id' => function() {
16 16
             // Default factory item to belong to Applicant, not JobApplication
17 17
             return factory(Applicant::class)->create()->id;
18 18
         },
Please login to merge, or discard this patch.
database/factories/SkillDeclarationFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@
 block discarded – undo
6 6
 use App\Models\Lookup\SkillLevel;
7 7
 use App\Models\Applicant;
8 8
 
9
-$factory->define(SkillDeclaration::class, function (Faker\Generator $faker) {
9
+$factory->define(SkillDeclaration::class, function(Faker\Generator $faker) {
10 10
     return [
11 11
         'skill_id' => Skill::inRandomOrder()->first()->id,
12 12
         'skill_status_id' => SkillStatus::inRandomOrder()->first()->id,
13 13
         'skill_level_id' => SkillLevel::inRandomOrder()->first()->id,
14
-        'skillable_id' => function () {
14
+        'skillable_id' => function() {
15 15
             return factory(Applicant::class)->create()->id;
16 16
         },
17 17
         'skillable_type' => 'applicant',
Please login to merge, or discard this patch.
database/factories/DegreeFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 use App\Models\Degree;
6 6
 use App\Models\Lookup\DegreeType;
7 7
 
8
-$factory->define(Degree::class, function (Faker $faker) {
8
+$factory->define(Degree::class, function(Faker $faker) {
9 9
     return [
10 10
         'degree_type_id' => DegreeType::inRandomOrder()->first()->id,
11 11
         'area_of_study' => $faker->word(),
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
         'thesis' => $faker->sentence(),
14 14
         'start_date' => $faker->dateTimeBetween('-3 years', '-1 years'),
15 15
         'end_date' => $faker->dateTimeBetween('-1 years', '-1 day'),
16
-        'degreeable_id' => function () {
16
+        'degreeable_id' => function() {
17 17
             // Default factory degrees to belong to Applicant, not JobApplication
18 18
             return factory(Applicant::class)->create()->id;
19 19
         },
Please login to merge, or discard this patch.
database/factories/ApplicationFactory.php 1 patch
Spacing   +5 added lines, -5 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
         'language_requirement_confirmed' => true,
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         'experience_saved' => true,
24 24
         'submission_signature' => $faker->name(),
25 25
         'submission_date' => $faker->dateTimeBetween('yesterday', 'tomorrow')->format('Y-m-d H:i:s'),
26
-        'applicant_id' => function () {
26
+        'applicant_id' => function() {
27 27
             return factory(Applicant::class)->create()->id;
28 28
         }
29 29
     ];
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     'submission_date' => null,
36 36
 ]);
37 37
 
38
-$factory->state(JobApplication::class, 'submitted', function (Faker\Generator $faker) {
38
+$factory->state(JobApplication::class, 'submitted', function(Faker\Generator $faker) {
39 39
     return [
40 40
         'application_status_id' => ApplicationStatus::where('name', 'submitted')->firstOrFail()->id,
41 41
         'submission_signature' => $faker->name(),
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     ];
45 45
 });
46 46
 
47
-$factory->afterCreating(JobApplication::class, function ($application) : void {
47
+$factory->afterCreating(JobApplication::class, function($application) : void {
48 48
     foreach ($application->job_poster->job_poster_questions as $question) {
49 49
         $answer = factory(JobApplicationAnswer::class)->create([
50 50
             'job_poster_question_id' => $question->id,
Please login to merge, or discard this patch.