Passed
Push — feature/immutable-application-... ( d4dc87...b29460 )
by Grant
08:27
created
database/factories/JobPosterKeyTaskFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 
6 6
 $faker_fr = Faker\Factory::create('fr');
7 7
 
8
-$factory->define(JobPosterKeyTask::class, function (Faker\Generator $faker) use ($faker_fr) {
8
+$factory->define(JobPosterKeyTask::class, function(Faker\Generator $faker) use ($faker_fr) {
9 9
     return [
10
-        'job_poster_id' => function () {
10
+        'job_poster_id' => function() {
11 11
             return factory(JobPoster::class)->create()->id;
12 12
         },
13 13
         'description:en' => $faker->sentence(),
Please login to merge, or discard this patch.
database/factories/JobPosterQuestionFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 
6 6
 $faker_fr = Faker\Factory::create('fr');
7 7
 
8
-$factory->define(JobPosterQuestion::class, function (Faker\Generator $faker) use ($faker_fr) {
8
+$factory->define(JobPosterQuestion::class, function(Faker\Generator $faker) use ($faker_fr) {
9 9
     return [
10
-        'job_poster_id' => function () {
10
+        'job_poster_id' => function() {
11 11
             return factory(JobPoster::class)->create()->id;
12 12
         },
13 13
         'description:en' => $faker->sentence(),
Please login to merge, or discard this patch.
database/factories/RatingGuideAnswerFactory.php 1 patch
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.
database/factories/TeamCultureFactory.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\TeamCulture;
6 6
 use App\Models\Manager;
7 7
 
8
-$factory->define(TeamCulture::class, function (Faker $faker) {
8
+$factory->define(TeamCulture::class, function(Faker $faker) {
9 9
     $faker_fr = FakerFactory::create('fr');
10 10
     return [
11 11
         'team_size' => $faker->numberBetween(5, 15),
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         'operating_context:fr' => $faker_fr->paragraph(),
19 19
         'what_we_value:fr' => $faker_fr->paragraph(),
20 20
         'how_we_work:fr' => $faker_fr->paragraph(),
21
-        'manager_id' => function () {
21
+        'manager_id' => function() {
22 22
             return factory(Manager::class)->create()->id;
23 23
         }
24 24
     ];
Please login to merge, or discard this patch.
app/Models/Course.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
  * @property \App\Models\Lookup\CourseStatus $course_status
26 26
  * @property \App\Models\Applicant|\App\Models\JobApplication $courseable
27 27
  */
28
-class Course extends BaseModel {
28
+class Course extends BaseModel{
29 29
 
30 30
     protected $casts = [
31 31
         'name' => 'string',
Please login to merge, or discard this patch.
app/Models/Project.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  *
22 22
  * @property \App\Models\Applicant|\App\Models\JobApplication $projectable
23 23
  */
24
-class Project extends BaseModel {
24
+class Project extends BaseModel{
25 25
 
26 26
     protected $casts = [
27 27
         'name' => 'string',
Please login to merge, or discard this patch.
app/Models/JobApplication.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
     public function meetsEssentialCriteria(): bool
261 261
     {
262 262
         $essentialCriteria = $this->job_poster->criteria->filter(
263
-            function ($value, $key) {
263
+            function($value, $key) {
264 264
                 return $value->criteria_type->name == 'essential';
265 265
             }
266 266
         );
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         $this->courses()->saveMany($applicant->courses->map->replicate());
315 315
         $this->work_experiences()->saveMany($applicant->work_experiences->map->replicate());
316 316
 
317
-        $copyWithHistory = function ($model) {
317
+        $copyWithHistory = function($model) {
318 318
             return [
319 319
                 'old' => $model,
320 320
                 'new' => $model->replicate()
@@ -333,19 +333,19 @@  discard block
 block discarded – undo
333 333
         $this->work_samples()->saveMany($workSampleMap->pluck('new'));
334 334
         $this->skill_declarations()->saveMany($skillDeclarationMap->pluck('new'));
335 335
 
336
-        $findNewFromOld = function ($mapping, $old) {
337
-            $matchingItem = $mapping->first(function ($value) use ($old) {
336
+        $findNewFromOld = function($mapping, $old) {
337
+            $matchingItem = $mapping->first(function($value) use ($old) {
338 338
                 return $value['old']->id === $old->id;
339 339
             });
340 340
             return $matchingItem['new'];
341 341
         };
342 342
 
343 343
         // Replicate copies shallow attributes, but not relationships. We have to copy those ourselves.
344
-        $findNewReferenceFromOld = function ($old) use ($findNewFromOld, $referenceMap) {
344
+        $findNewReferenceFromOld = function($old) use ($findNewFromOld, $referenceMap) {
345 345
             return $findNewFromOld($referenceMap, $old);
346 346
         };
347 347
 
348
-        $findNewSkillDeclarationFromOld = function ($old) use ($findNewFromOld, $skillDeclarationMap) {
348
+        $findNewSkillDeclarationFromOld = function($old) use ($findNewFromOld, $skillDeclarationMap) {
349 349
             return $findNewFromOld($skillDeclarationMap, $old);
350 350
         };
351 351
 
Please login to merge, or discard this patch.
database/factories/JobPosterFactory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 $faker_fr = Faker\Factory::create('fr');
19 19
 
20
-$factory->define(JobPoster::class, function (Faker\Generator $faker) use ($faker_fr) {
20
+$factory->define(JobPoster::class, function(Faker\Generator $faker) use ($faker_fr) {
21 21
     $closeDate = $faker->dateTimeBetween('now', '1 months')->format('Y-m-d');
22 22
     $openDate = $faker->dateTimeBetween('-1 months', 'now')->format('Y-m-d');
23 23
     $startDate = $faker->dateTimeBetween('1 months', '2 months')->format('Y-m-d');
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         'security_clearance_id' => SecurityClearance::inRandomOrder()->first()->id,
61 61
         'language_requirement_id' => LanguageRequirement::inRandomOrder()->first()->id,
62 62
         'remote_work_allowed' => $faker->boolean(50),
63
-        'manager_id' => function () {
63
+        'manager_id' => function() {
64 64
             return factory(Manager::class)->create()->id;
65 65
         },
66 66
         'team_size' => $faker->numberBetween(5, 30),
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     ];
99 99
 });
100 100
 
101
-$factory->afterCreating(JobPoster::class, function ($jp) : void {
101
+$factory->afterCreating(JobPoster::class, function($jp) : void {
102 102
     // Save at least one of each kind of criteria.
103 103
     $jp->criteria()->save(factory(Criteria::class)->state('essential')->make([
104 104
         'job_poster_id' => $jp->id
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 $factory->state(
122 122
     JobPoster::class,
123 123
     'byUpgradedManager',
124
-    ['manager_id' => function () {
124
+    ['manager_id' => function() {
125 125
             return factory(Manager::class)->state('upgraded')->create()->id;
126 126
     }]
127 127
 );
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 $factory->state(
130 130
     JobPoster::class,
131 131
     'published',
132
-    function (Faker\Generator $faker) {
132
+    function(Faker\Generator $faker) {
133 133
         return [
134 134
             'published' => true,
135 135
             'published_at' => $faker->dateTimeBetween('-1 months', '-3 weeks')
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 $factory->state(
141 141
     JobPoster::class,
142 142
     'closed',
143
-    function (Faker\Generator $faker) {
143
+    function(Faker\Generator $faker) {
144 144
         return [
145 145
             'published' => true,
146 146
             'published_at' => $faker->dateTimeBetween('-1 months', '-3 weeks'),
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 $factory->state(
153 153
     JobPoster::class,
154 154
     'draft',
155
-    function (Faker\Generator $faker) {
155
+    function(Faker\Generator $faker) {
156 156
         return [
157 157
             'published' => false,
158 158
             'open_date_time' => ptDayStartToUtcTime($faker->dateTimeBetween('5 days', '10 days')->format('Y-m-d')),
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 $factory->state(
167 167
     JobPoster::class,
168 168
     'review_requested',
169
-    function (Faker\Generator $faker) {
169
+    function(Faker\Generator $faker) {
170 170
         return [
171 171
             'published' => false,
172 172
             'open_date_time' => ptDayStartToUtcTime($faker->dateTimeBetween('5 days', '10 days')->format('Y-m-d')),
Please login to merge, or discard this patch.
database/factories/WorkSampleFactory.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\Lookup\FileType;
6 6
 use App\Models\WorkSample;
7 7
 
8
-$factory->define(WorkSample::class, function (Faker $faker) {
8
+$factory->define(WorkSample::class, function(Faker $faker) {
9 9
     return [
10 10
         'name' => $faker->words(3, true),
11 11
         'file_type_id' => FileType::inRandomOrder()->first()->id,
12 12
         'url' => $faker->url(),
13 13
         'description' => $faker->paragraph(),
14 14
         'date_created' => $faker->dateTimeBetween('-3 years', '-1 years'),
15
-        'work_sampleable_id' => function () {
15
+        'work_sampleable_id' => function() {
16 16
             // Factory items to belong to Applicant by default, not JobApplication
17 17
             return factory(Applicant::class)->create()->id;
18 18
         },
Please login to merge, or discard this patch.