@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function run() |
13 | 13 | { |
14 | - $this->call([ |
|
14 | + $this->call ([ |
|
15 | 15 | DevSeeder::class, |
16 | 16 | SkillClassificationSeeder::class |
17 | 17 | ]); |
@@ -14,8 +14,8 @@ |
||
14 | 14 | */ |
15 | 15 | public function run() |
16 | 16 | { |
17 | - factory(Manager::class, 10)->create(); |
|
18 | - factory(Applicant::class, 5)->create(); |
|
17 | + factory (Manager::class, 10)->create (); |
|
18 | + factory (Applicant::class, 5)->create (); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | } |
@@ -44,86 +44,86 @@ |
||
44 | 44 | */ |
45 | 45 | public function run() : void |
46 | 46 | { |
47 | - $adminUser = User::where('email', $this->adminEmail)->first(); |
|
47 | + $adminUser = User::where ('email', $this->adminEmail)->first (); |
|
48 | 48 | if ($adminUser === null) { |
49 | - $adminUser = factory(User::class)->state('admin')->create(['email' => $this->adminEmail]); |
|
49 | + $adminUser = factory (User::class)->state ('admin')->create (['email' => $this->adminEmail]); |
|
50 | 50 | } |
51 | 51 | |
52 | - $managerUser = User::where('email', $this->managerEmail)->first(); |
|
52 | + $managerUser = User::where ('email', $this->managerEmail)->first (); |
|
53 | 53 | // Create the test manager if it does not exist yet. |
54 | 54 | if ($managerUser === null) { |
55 | - $managerUser = factory(User::class)->state('upgradedManager')->create(['email' => $this->managerEmail]); |
|
56 | - $managerUser->manager()->save(factory(Manager::class)->create([ |
|
55 | + $managerUser = factory (User::class)->state ('upgradedManager')->create (['email' => $this->managerEmail]); |
|
56 | + $managerUser->manager ()->save (factory (Manager::class)->create ([ |
|
57 | 57 | 'user_id' => $managerUser->id |
58 | 58 | ])); |
59 | 59 | } |
60 | 60 | |
61 | - factory(JobPoster::class, 3)->state('published')->create([ |
|
61 | + factory (JobPoster::class, 3)->state ('published')->create ([ |
|
62 | 62 | 'manager_id' => $managerUser->manager->id |
63 | - ])->each(function ($job) : void { |
|
64 | - $job->job_applications()->saveMany(factory(JobApplication::class, 5))->create([ |
|
63 | + ])->each (function ($job) : void { |
|
64 | + $job->job_applications ()->saveMany (factory (JobApplication::class, 5))->create ([ |
|
65 | 65 | 'job_poster_id' => $job->id |
66 | 66 | ]); |
67 | 67 | // Then create one application with a priority user. |
68 | - $job->job_applications()->save(factory(JobApplication::class)->create([ |
|
68 | + $job->job_applications ()->save (factory (JobApplication::class)->create ([ |
|
69 | 69 | 'job_poster_id' => $job->id, |
70 | - 'applicant_id' => factory(Applicant::class)->create([ |
|
71 | - 'user_id' => factory(User::class)->state('priority')->create()->id |
|
70 | + 'applicant_id' => factory (Applicant::class)->create ([ |
|
71 | + 'user_id' => factory (User::class)->state ('priority')->create ()->id |
|
72 | 72 | ])->id |
73 | 73 | ])); |
74 | 74 | }); |
75 | - factory(JobPoster::class, 3)->state('closed')->create([ |
|
75 | + factory (JobPoster::class, 3)->state ('closed')->create ([ |
|
76 | 76 | 'manager_id' => $managerUser->manager->id |
77 | - ])->each(function ($job) : void { |
|
78 | - $job->job_applications()->saveMany(factory(JobApplication::class, 5))->create([ |
|
77 | + ])->each (function ($job) : void { |
|
78 | + $job->job_applications ()->saveMany (factory (JobApplication::class, 5))->create ([ |
|
79 | 79 | 'job_poster_id' => $job->id |
80 | 80 | ]); |
81 | 81 | // Then create one application with a priority user. |
82 | - $job->job_applications()->save(factory(JobApplication::class)->create([ |
|
82 | + $job->job_applications ()->save (factory (JobApplication::class)->create ([ |
|
83 | 83 | 'job_poster_id' => $job->id, |
84 | - 'applicant_id' => factory(Applicant::class)->create([ |
|
85 | - 'user_id' => factory(User::class)->state('priority')->create()->id |
|
84 | + 'applicant_id' => factory (Applicant::class)->create ([ |
|
85 | + 'user_id' => factory (User::class)->state ('priority')->create ()->id |
|
86 | 86 | ])->id |
87 | 87 | ])); |
88 | 88 | }); |
89 | - factory(JobPoster::class, 3)->state('draft')->create([ |
|
89 | + factory (JobPoster::class, 3)->state ('draft')->create ([ |
|
90 | 90 | 'manager_id' => $managerUser->manager->id |
91 | 91 | ]); |
92 | - factory(JobPoster::class, 3)->state('review_requested')->create([ |
|
92 | + factory (JobPoster::class, 3)->state ('review_requested')->create ([ |
|
93 | 93 | 'manager_id' => $managerUser->manager->id |
94 | 94 | ]); |
95 | 95 | |
96 | 96 | // Create a Job Poster with an Assessment Plan. |
97 | - $jobWithAssessment = factory(JobPoster::class)->state('draft')->create([ |
|
97 | + $jobWithAssessment = factory (JobPoster::class)->state ('draft')->create ([ |
|
98 | 98 | 'manager_id' => $managerUser->manager->id, |
99 | 99 | ]); |
100 | 100 | foreach ($jobWithAssessment->criteria as $criterion) { |
101 | 101 | // Create an assessment for each criterion. |
102 | - factory(Assessment::class)->state('withRatingGuide')->create([ |
|
102 | + factory (Assessment::class)->state ('withRatingGuide')->create ([ |
|
103 | 103 | 'criterion_id' => $criterion->id, |
104 | 104 | ]); |
105 | 105 | }; |
106 | 106 | |
107 | - $applicantUser = User::where('email', $this->applicantEmail)->first(); |
|
107 | + $applicantUser = User::where ('email', $this->applicantEmail)->first (); |
|
108 | 108 | if ($applicantUser === null) { |
109 | - $applicantUser = factory(User::class)->state('applicant')->create([ |
|
109 | + $applicantUser = factory (User::class)->state ('applicant')->create ([ |
|
110 | 110 | 'email' => $this->applicantEmail |
111 | 111 | ]); |
112 | - $applicantUser->applicant()->save(factory(Applicant::class)->create([ |
|
112 | + $applicantUser->applicant ()->save (factory (Applicant::class)->create ([ |
|
113 | 113 | 'user_id' => $applicantUser->id |
114 | 114 | ])); |
115 | 115 | } |
116 | 116 | |
117 | 117 | // Add to application profile. |
118 | - $applicantUser->applicant->references()->saveMany(factory(Reference::class, 3)->create([ |
|
118 | + $applicantUser->applicant->references ()->saveMany (factory (Reference::class, 3)->create ([ |
|
119 | 119 | 'applicant_id' => $applicantUser->applicant->id |
120 | 120 | ])); |
121 | 121 | |
122 | 122 | // Create several applications for test user. |
123 | - $applicantUser->applicant->job_applications()->saveMany(factory(JobApplication::class, 3)->create([ |
|
123 | + $applicantUser->applicant->job_applications ()->saveMany (factory (JobApplication::class, 3)->create ([ |
|
124 | 124 | 'applicant_id' => $applicantUser->applicant->id, |
125 | 125 | ])); |
126 | - $applicantUser->applicant->job_applications()->saveMany(factory(JobApplication::class, 2)->state('draft')->create([ |
|
126 | + $applicantUser->applicant->job_applications ()->saveMany (factory (JobApplication::class, 2)->state ('draft')->create ([ |
|
127 | 127 | 'applicant_id' => $applicantUser->applicant->id, |
128 | 128 | ])); |
129 | 129 | } |
@@ -28,6 +28,6 @@ |
||
28 | 28 | |
29 | 29 | public function job_posters() //phpcs:ignore |
30 | 30 | { |
31 | - return $this->hasMany(\App\Models\JobPoster::class); |
|
31 | + return $this->hasMany (\App\Models\JobPoster::class); |
|
32 | 32 | } |
33 | 33 | } |
@@ -27,6 +27,6 @@ |
||
27 | 27 | |
28 | 28 | public function skill_declarations() //phpcs:ignore |
29 | 29 | { |
30 | - return $this->hasMany(\App\Models\SkillDeclaration::class); |
|
30 | + return $this->hasMany (\App\Models\SkillDeclaration::class); |
|
31 | 31 | } |
32 | 32 | } |
@@ -28,6 +28,6 @@ |
||
28 | 28 | |
29 | 29 | public function job_applications() //phpcs:ignore |
30 | 30 | { |
31 | - return $this->hasMany(\App\Models\JobApplication::class); |
|
31 | + return $this->hasMany (\App\Models\JobApplication::class); |
|
32 | 32 | } |
33 | 33 | } |
@@ -28,6 +28,6 @@ |
||
28 | 28 | |
29 | 29 | public function job_posters() //phpcs:ignore |
30 | 30 | { |
31 | - return $this->hasMany(\App\Models\JobPoster::class); |
|
31 | + return $this->hasMany (\App\Models\JobPoster::class); |
|
32 | 32 | } |
33 | 33 | } |
@@ -29,6 +29,6 @@ |
||
29 | 29 | |
30 | 30 | public function job_posters() // phpcs:ignore |
31 | 31 | { |
32 | - return $this->hasMany(\App\Models\JobPoster::class); |
|
32 | + return $this->hasMany (\App\Models\JobPoster::class); |
|
33 | 33 | } |
34 | 34 | } |
@@ -28,6 +28,6 @@ |
||
28 | 28 | |
29 | 29 | public function job_posters() //phpcs:ignore |
30 | 30 | { |
31 | - return $this->hasMany(\App\Models\JobPoster::class); |
|
31 | + return $this->hasMany (\App\Models\JobPoster::class); |
|
32 | 32 | } |
33 | 33 | } |