Passed
Push — chore/format-php ( 5ef121 )
by Grant
16:21
created
app/Services/Validation/Rules/PassesValidatorRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function passes($attribute, $value)
33 33
     {
34
-        return $value->contains(function ($object) {
34
+        return $value->contains(function($object){
35 35
             $object->getRelationValue($this->relationName)->is($this->relationValue);
36 36
         });
37 37
     }
Please login to merge, or discard this patch.
app/Services/Validation/Rules/ContainsObjectWithAttributeRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         // debugbar()->debug($value);
47 47
         // debugbar()->debug($this->attributeName);
48 48
         // debugbar()->debug($this->attributeValue);
49
-        return $this->array_any($value, function ($object) {
49
+        return $this->array_any($value, function($object){
50 50
             return $object[$this->attributeName] == $this->attributeValue;
51 51
         });
52 52
     }
Please login to merge, or discard this patch.
app/Models/JobPoster.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -373,7 +373,7 @@
 block discarded – undo
373 373
      */
374 374
     public function submitted_applications() // phpcs:ignore
375 375
     {
376
-        return $this->hasMany(\App\Models\JobApplication::class)->whereDoesntHave('application_status', function ($query): void {
376
+        return $this->hasMany(\App\Models\JobApplication::class)->whereDoesntHave('application_status', function($query): void {
377 377
             $query->where('name', 'draft');
378 378
         });
379 379
     }
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/BasePolicy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
     public function before($user, $ability)
13 13
     {
14 14
         if ($user->isAdmin()) {
15
-            $userText = '{id='.$user->id.'}';
16
-            Log::notice('User '.$userText.' has bypassed policy as an Admin');
15
+            $userText = '{id=' . $user->id . '}';
16
+            Log::notice('User ' . $userText . ' has bypassed policy as an Admin');
17 17
             return true;
18 18
         }
19 19
     }
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.