Passed
Push — chore/format-php ( 5ef121 )
by Grant
16:21
created
app/Services/Validation/Rules/PassesValidatorRule.php 1 patch
Braces   +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
Braces   +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/RatingGuideAnswer.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@
 block discarded – undo
36 36
      */
37 37
     public function setCriterionIdAttribute($value): void
38 38
     {
39
-        if (empty($value)) { // will check for empty string, null values
39
+        if (empty($value)) {
40
+// will check for empty string, null values
40 41
             $this->attributes['criterion_id'] = null;
41 42
         } else {
42 43
             $this->attributes['criterion_id'] = $value;
Please login to merge, or discard this patch.
app/Policies/ApplicantPolicy.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@
 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();
Please login to merge, or discard this patch.
database/factories/JobPosterFactory.php 1 patch
Braces   +7 added lines, -7 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),
@@ -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
Braces   +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
Braces   +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/UserFactory.php 1 patch
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
 $faker_fr = Faker\Factory::create('fr');
25 25
 
26
-$factory->define(User::class, function (Faker\Generator $faker) {
26
+$factory->define(User::class, function (Faker\Generator $faker){
27 27
     static $password;
28 28
 
29 29
     return [
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     ];
39 39
 });
40 40
 
41
-$factory->state(User::class, 'upgradedManager', function (Faker\Generator $faker) {
41
+$factory->state(User::class, 'upgradedManager', function (Faker\Generator $faker){
42 42
     return [
43 43
         'user_role_id' => UserRole::where('name', 'upgradedManager')->first()->id,
44 44
         'gov_email' => $faker->unique()->safeEmail(),
@@ -57,20 +57,20 @@  discard block
 block discarded – undo
57 57
     'is_priority' => true
58 58
 ]);
59 59
 
60
-$factory->define(Applicant::class, function (Faker\Generator $faker) {
60
+$factory->define(Applicant::class, function (Faker\Generator $faker){
61 61
     return [
62 62
         'twitter_username' => $faker->firstName(),
63 63
         'linkedin_url' => null,
64 64
         'tagline' => $faker->paragraph(),
65 65
         'personal_website' => $faker->url(),
66 66
         'is_snapshot' => false,
67
-        'user_id' => function () {
67
+        'user_id' => function (){
68 68
             return factory(User::class)->states('applicant')->create()->id;
69 69
         },
70 70
     ];
71 71
 });
72 72
 
73
-$factory->define(Manager::class, function (Faker\Generator $faker) use ($faker_fr) {
73
+$factory->define(Manager::class, function (Faker\Generator $faker) use ($faker_fr){
74 74
     return [
75 75
         'twitter_username' => $faker->firstName(),
76 76
         'linkedin_url' => null,
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         'development_opportunity_frequency_id' => Frequency::inRandomOrder()->first()->id,
82 82
         'refuse_low_value_work_frequency_id' => Frequency::inRandomOrder()->first()->id,
83 83
         'years_experience' => $faker->numberBetween(2, 25),
84
-        'user_id' => function () use ($faker) {
84
+        'user_id' => function () use ($faker){
85 85
             return factory(User::class)->create([
86 86
                 'gov_email' => $faker->unique()->safeEmail(),
87 87
             ])->id;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 });
131 131
 
132 132
 $factory->state(Manager::class, 'upgraded', [
133
-    'user_id' => function () {
133
+    'user_id' => function (){
134 134
         return factory(User::class)->state('upgradedManager')->create()->id;
135 135
     },
136 136
 ]);
Please login to merge, or discard this patch.
database/factories/ApplicationFactory.php 1 patch
Braces   +3 added lines, -3 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
     ];
Please login to merge, or discard this patch.