Passed
Push — dev ( b43f63...8234f4 )
by Yonathan
12:54 queued 03:27
created
database/factories/ReferenceFactory.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -6,31 +6,31 @@
 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
-        'name' => $faker->name(),
12
-        'email' => $faker->safeEmail(),
13
-        'description' => $faker->paragraphs(2, true),
14
-        'relationship_id' => Relationship::inRandomOrder()->first()->id,
15
-        'applicant_id' => function () {
16
-            return factory(Applicant::class)->create()->id;
11
+        'name' => $faker->name (),
12
+        'email' => $faker->safeEmail (),
13
+        'description' => $faker->paragraphs (2, true),
14
+        'relationship_id' => Relationship::inRandomOrder ()->first ()->id,
15
+        'applicant_id' => function (){
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
-        'name' => $faker->sentence(),
24
-        'start_date' => $faker->dateTimeBetween('-3 years', '-1 years'),
25
-        'end_date' => $faker->dateTimeBetween('-1 years', '-1 day'),
26
-        'applicant_id' => function () {
27
-            return factory(Applicant::class)->create()->id;
23
+        'name' => $faker->sentence (),
24
+        'start_date' => $faker->dateTimeBetween ('-3 years', '-1 years'),
25
+        'end_date' => $faker->dateTimeBetween ('-1 years', '-1 day'),
26
+        'applicant_id' => function (){
27
+            return factory (Applicant::class)->create ()->id;
28 28
         },
29 29
     ];
30 30
 });
31 31
 
32
-$factory->afterCreating(Reference::class, function ($reference) : void {
33
-    $reference->projects()->saveMany(factory(Project::class, 3)->make([
32
+$factory->afterCreating (Reference::class, function ($reference) : void {
33
+    $reference->projects ()->saveMany (factory (Project::class, 3)->make ([
34 34
         'applicant_id' => $reference->applicant_id
35 35
     ]));
36 36
 });
Please login to merge, or discard this patch.
database/factories/RatingGuideQuestionFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
 use App\Models\RatingGuideQuestion;
6 6
 use App\Models\JobPoster;
7 7
 
8
-$factory->define(RatingGuideQuestion::class, function (Faker\Generator $faker) {
8
+$factory->define (RatingGuideQuestion::class, function (Faker\Generator $faker){
9 9
     return [
10
-        'job_poster_id' => function () {
11
-            return factory(JobPoster::class)->create()->id;
10
+        'job_poster_id' => function (){
11
+            return factory (JobPoster::class)->create ()->id;
12 12
         },
13
-        'assessment_type_id' => AssessmentType::inRandomOrder()->first()->id,
14
-        'question' => $faker->sentence(),
13
+        'assessment_type_id' => AssessmentType::inRandomOrder ()->first ()->id,
14
+        'question' => $faker->sentence (),
15 15
     ];
16 16
 });
Please login to merge, or discard this patch.
database/factories/RatingGuideAnswerFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 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 () {
11
-            return factory(RatingGuideQuestion::class)->create()->id;
10
+        'rating_guide_question_id' => function (){
11
+            return factory (RatingGuideQuestion::class)->create ()->id;
12 12
         },
13 13
         'criterion_id' => null,
14
-        'expected_answer' => $faker->sentence(),
14
+        'expected_answer' => $faker->sentence (),
15 15
     ];
16 16
 });
Please login to merge, or discard this patch.
database/factories/JobApplicationAnswerFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@
 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 () {
11
-            return factory(JobPosterQuestion::class)->create()->id;
10
+        'job_poster_question_id' => function (){
11
+            return factory (JobPosterQuestion::class)->create ()->id;
12 12
         },
13
-        'job_application_id' => function () {
14
-            return factory(JobApplication::class)->create()->id;
13
+        'job_application_id' => function (){
14
+            return factory (JobApplication::class)->create ()->id;
15 15
         },
16
-        'answer' => $faker->paragraph()
16
+        'answer' => $faker->paragraph ()
17 17
     ];
18 18
 });
Please login to merge, or discard this patch.
database/factories/SkillDeclarationFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@
 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
-        'skill_id' => Skill::inRandomOrder()->first()->id,
12
-        'skill_status_id' => SkillStatus::inRandomOrder()->first()->id,
13
-        'skill_level_id' => SkillLevel::inRandomOrder()->first()->id,
14
-        'applicant_id' => function () {
15
-            return factory(Applicant::class)->create()->id;
11
+        'skill_id' => Skill::inRandomOrder ()->first ()->id,
12
+        'skill_status_id' => SkillStatus::inRandomOrder ()->first ()->id,
13
+        'skill_level_id' => SkillLevel::inRandomOrder ()->first ()->id,
14
+        'applicant_id' => function (){
15
+            return factory (Applicant::class)->create ()->id;
16 16
         },
17
-        'description' => $faker->paragraphs(3, true),
17
+        'description' => $faker->paragraphs (3, true),
18 18
     ];
19 19
 });
Please login to merge, or discard this patch.
database/factories/ApplicationFactory.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -10,39 +10,39 @@
 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 () {
16
-            return factory(JobPoster::class)->states('published')->create()->id;
15
+        'job_poster_id' => function (){
16
+            return factory (JobPoster::class)->states ('published')->create ()->id;
17 17
         },
18
-        'application_status_id' => ApplicationStatus::where('name', 'submitted')->firstOrFail()->id,
19
-        'citizenship_declaration_id' => CitizenshipDeclaration::inRandomOrder()->first()->id,
20
-        'veteran_status_id' => VeteranStatus::inRandomOrder()->first()->id,
21
-        'preferred_language_id' => PreferredLanguage::inRandomOrder()->first()->id,
22
-        'submission_signature' => $faker->name(),
23
-        'submission_date' => $faker->dateTimeBetween('yesterday', 'tomorrow')->format('Y-m-d H:i:s'),
24
-        'applicant_id' => function () {
25
-            return factory(Applicant::class)->create()->id;
18
+        'application_status_id' => ApplicationStatus::where ('name', 'submitted')->firstOrFail ()->id,
19
+        'citizenship_declaration_id' => CitizenshipDeclaration::inRandomOrder ()->first ()->id,
20
+        'veteran_status_id' => VeteranStatus::inRandomOrder ()->first ()->id,
21
+        'preferred_language_id' => PreferredLanguage::inRandomOrder ()->first ()->id,
22
+        'submission_signature' => $faker->name (),
23
+        'submission_date' => $faker->dateTimeBetween ('yesterday', 'tomorrow')->format ('Y-m-d H:i:s'),
24
+        'applicant_id' => function (){
25
+            return factory (Applicant::class)->create ()->id;
26 26
         }
27 27
     ];
28 28
 });
29 29
 
30
-$factory->state(JobApplication::class, 'draft', [
31
-    'application_status_id' => ApplicationStatus::where('name', 'draft')->firstOrFail()->id,
30
+$factory->state (JobApplication::class, 'draft', [
31
+    'application_status_id' => ApplicationStatus::where ('name', 'draft')->firstOrFail ()->id,
32 32
     'submission_signature' => null,
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
-        $answer = factory(JobApplicationAnswer::class)->create([
38
+        $answer = factory (JobApplicationAnswer::class)->create ([
39 39
             'job_poster_question_id' => $question->id,
40 40
             'job_application_id' => $application->id
41 41
         ]);
42
-        $application->job_application_answers()->save($answer);
42
+        $application->job_application_answers ()->save ($answer);
43 43
     }
44 44
     foreach ($application->job_poster->criteria as $criterion) {
45
-        factory(SkillDeclaration::class)->create([
45
+        factory (SkillDeclaration::class)->create ([
46 46
             'skill_id' => $criterion->skill_id,
47 47
             'applicant_id' => $application->applicant_id,
48 48
         ]);
Please login to merge, or discard this patch.
database/factories/AssessmentFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,22 +6,22 @@
 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 () {
12
-            return factory(Criteria::class)->create()->id;
11
+        'criterion_id' => function (){
12
+            return factory (Criteria::class)->create ()->id;
13 13
         },
14
-        'assessment_type_id' => AssessmentType::inRandomOrder()->first()->id,
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
-    $question = factory(RatingGuideQuestion::class)->create([
20
+    $question = factory (RatingGuideQuestion::class)->create ([
21 21
         'job_poster_id' => $assessment->criterion->job_poster_id,
22 22
         'assessment_type_id' => $assessment->assessment_type_id,
23 23
     ]);
24
-    factory(RatingGuideAnswer::class)->create([
24
+    factory (RatingGuideAnswer::class)->create ([
25 25
         'rating_guide_question_id' => $question->id,
26 26
         'criterion_id' => $assessment->criterion_id,
27 27
     ]);
Please login to merge, or discard this patch.
app/Models/JobPosterQuestionTranslation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  * 
21 21
  * @property \App\Models\JobPosterQuestion $job_poster_question
22 22
  */
23
-class JobPosterQuestionTranslation extends BaseModel {
23
+class JobPosterQuestionTranslation extends BaseModel{
24 24
 
25 25
     protected $casts = [
26 26
         'job_poster_question_id' => 'int'
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
         'description'
31 31
     ];
32 32
 
33
-    public function job_poster_question() {
34
-        return $this->belongsTo(\App\Models\JobPosterQuestion::class);
33
+    public function job_poster_question(){
34
+        return $this->belongsTo (\App\Models\JobPosterQuestion::class);
35 35
     }
36 36
 
37 37
 }
Please login to merge, or discard this patch.
app/Models/TeamCulture.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@
 block discarded – undo
47 47
 
48 48
     public function manager()
49 49
     {
50
-        return $this->belongsTo(\App\Models\Manager::class);
50
+        return $this->belongsTo (\App\Models\Manager::class);
51 51
     }
52 52
 
53 53
     public function team_culture_translations() //phpcs:ignore
54 54
     {
55
-        return $this->hasMany(\App\Models\TeamCultureTranslation::class);
55
+        return $this->hasMany (\App\Models\TeamCultureTranslation::class);
56 56
     }
57 57
 }
Please login to merge, or discard this patch.