Passed
Push — dev ( 8234f4...4fa166 )
by Tristan
08:41
created
app/Models/Lookup/PreferredLanguage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
  * @property \Illuminate\Database\Eloquent\Collection $job_applications
16 16
  *
17 17
  */
18
-class PreferredLanguage extends BaseModel {
18
+class PreferredLanguage extends BaseModel{
19 19
 
20 20
     protected $fillable = [];
21 21
 
22
-    public function job_applications() {
22
+    public function job_applications(){
23 23
         return $this->hasMany(\App\Models\JobApplication::class);
24 24
     }
25 25
 
Please login to merge, or discard this patch.
app/Policies/ApplicantPolicy.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
         $user_id = $user->id;
24 24
         return JobPoster::whereHas(
25 25
             'manager',
26
-            function ($q) use ($user_id) {
26
+            function($q) use ($user_id) {
27 27
                 $q->where('user_id', $user_id);
28 28
             }
29 29
         )->whereHas(
30 30
             'submitted_applications',
31
-            function ($q) use ($applicant_id) {
31
+            function($q) use ($applicant_id) {
32 32
                     $q->where('applicant_id', $applicant_id);
33 33
             }
34 34
         )->get()->isNotEmpty();
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function view(User $user, Applicant $applicant)
45 45
     {
46
-        $authApplicant =  $user->isApplicant() &&
46
+        $authApplicant = $user->isApplicant() &&
47 47
             $applicant->user->is($user);
48 48
         $authManager = $user->isManager() && $this->ownsJobApplicantAppliedTo($user, $applicant);
49 49
         return $authApplicant || $authManager;
Please login to merge, or discard this patch.
app/Policies/ApplicationPolicy.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
         $authManager = ($user->isManager() &&
26 26
             $jobApplication->job_poster->manager->user->is($user));
27 27
 
28
-        return $authApplicant||$authManager;
28
+        return $authApplicant || $authManager;
29 29
     }
30 30
 
31 31
     /**
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),
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     ];
119 119
 });
120 120
 
121
-$factory->afterCreating(JobPoster::class, function ($jp) : void {
121
+$factory->afterCreating(JobPoster::class, function($jp) : void {
122 122
     $jp->criteria()->saveMany(factory(Criteria::class, 5)->make([
123 123
         'job_poster_id' => $jp->id
124 124
     ]));
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 $factory->state(
134 134
     JobPoster::class,
135 135
     'byUpgradedManager',
136
-    ['manager_id' => function () {
136
+    ['manager_id' => function(){
137 137
             return factory(Manager::class)->state('upgraded')->create()->id;
138 138
     }]
139 139
 );
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 $factory->state(
142 142
     JobPoster::class,
143 143
     'published',
144
-    function (Faker\Generator $faker) {
144
+    function(Faker\Generator $faker){
145 145
         return [
146 146
             'published' => true,
147 147
             '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
     'closed',
155
-    function (Faker\Generator $faker) {
155
+    function(Faker\Generator $faker){
156 156
         return [
157 157
             'published' => true,
158 158
             'published_at' => $faker->dateTimeBetween('-1 months', '-3 weeks'),
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 $factory->state(
165 165
     JobPoster::class,
166 166
     'draft',
167
-    function (Faker\Generator $faker) {
167
+    function(Faker\Generator $faker){
168 168
         return [
169 169
             'published' => false,
170 170
             'open_date_time' => ptDayStartToUtcTime($faker->dateTimeBetween('5 days', '10 days')->format('Y-m-d')),
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 $factory->state(
179 179
     JobPoster::class,
180 180
     'review_requested',
181
-    function (Faker\Generator $faker) {
181
+    function(Faker\Generator $faker){
182 182
         return [
183 183
             'published' => false,
184 184
             'open_date_time' => ptDayStartToUtcTime($faker->dateTimeBetween('5 days', '10 days')->format('Y-m-d')),
Please login to merge, or discard this patch.
database/factories/RatingGuideQuestionFactory.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\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 () {
10
+        'job_poster_id' => function(){
11 11
             return factory(JobPoster::class)->create()->id;
12 12
         },
13 13
         'assessment_type_id' => AssessmentType::inRandomOrder()->first()->id,
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
-        'applicant_id' => function () {
14
+        'applicant_id' => function(){
15 15
             return factory(Applicant::class)->create()->id;
16 16
         },
17 17
         'description' => $faker->paragraphs(3, true),
Please login to merge, or discard this patch.
database/factories/ApplicationFactory.php 1 patch
Spacing   +4 added lines, -4 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
         'application_status_id' => ApplicationStatus::where('name', 'submitted')->firstOrFail()->id,
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         'preferred_language_id' => PreferredLanguage::inRandomOrder()->first()->id,
22 22
         'submission_signature' => $faker->name(),
23 23
         'submission_date' => $faker->dateTimeBetween('yesterday', 'tomorrow')->format('Y-m-d H:i:s'),
24
-        'applicant_id' => function () {
24
+        'applicant_id' => function(){
25 25
             return factory(Applicant::class)->create()->id;
26 26
         }
27 27
     ];
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
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 38
         $answer = factory(JobApplicationAnswer::class)->create([
39 39
             'job_poster_question_id' => $question->id,
Please login to merge, or discard this patch.
database/factories/AssessmentFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@
 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 () {
11
+        'criterion_id' => function(){
12 12
             return factory(Criteria::class)->create()->id;
13 13
         },
14 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 20
     $question = factory(RatingGuideQuestion::class)->create([
21 21
         'job_poster_id' => $assessment->criterion->job_poster_id,
Please login to merge, or discard this patch.
database/factories/JobApplicationAnswerFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 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 () {
10
+        'job_poster_question_id' => function(){
11 11
             return factory(JobPosterQuestion::class)->create()->id;
12 12
         },
13
-        'job_application_id' => function () {
13
+        'job_application_id' => function(){
14 14
             return factory(JobApplication::class)->create()->id;
15 15
         },
16 16
         'answer' => $faker->paragraph()
Please login to merge, or discard this patch.