Passed
Push — chore/format-php ( 5ef121 )
by Grant
16:21
created
app/Models/Criteria.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
  * @property string $level_description The localized description of the skill level (accounts for skill type).
29 29
  *
30 30
  *  Localized Properties:
31
-  * @property string $description
32
-  * @property string $specificity
31
+ * @property string $description
32
+ * @property string $specificity
33 33
  */
34 34
 class Criteria extends BaseModel
35 35
 {
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/Models/User.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -173,10 +173,10 @@  discard block
 block discarded – undo
173 173
     }
174 174
 
175 175
     /**
176
-    * Check if the user has the specified role.
177
-    * @param string $role This may be either 'applicant', 'manager' or 'admin'.
178
-    * @return boolean
179
-    */
176
+     * Check if the user has the specified role.
177
+     * @param string $role This may be either 'applicant', 'manager' or 'admin'.
178
+     * @return boolean
179
+     */
180 180
     public function hasRole($role)
181 181
     {
182 182
         switch ($role) {
@@ -195,8 +195,8 @@  discard block
 block discarded – undo
195 195
      * Set this user to the specified role.
196 196
      *
197 197
      * @param string $role Must be either 'applicant', 'manager' or 'admin.
198
-    * @return void
199
-    */
198
+     * @return void
199
+     */
200 200
     public function setRole(string $role): void
201 201
     {
202 202
         $this->user_role()->associate(UserRole::where('name', $role)->firstOrFail());
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      * Returns a user's full name.
232 232
      *
233 233
      * @return string
234
-    */
234
+     */
235 235
     public function getFullNameAttribute(): string
236 236
     {
237 237
         return $this->first_name . ' ' . $this->last_name;
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 2 patches
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.
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.
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 2 patches
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.
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 2 patches
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.
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.