Passed
Push — feature/immutable-application-... ( c095e1...d4dc87 )
by Grant
07:35 queued 11s
created
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/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.