Passed
Push — task/common-translation-packag... ( 1125af...852212 )
by Grant
08:02
created
app/Models/JobApplication.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -86,51 +86,51 @@  discard block
 block discarded – undo
86 86
     protected $appends = ['meets_essential_criteria'];
87 87
 
88 88
     protected function createApplicantSnapshot($applicant_id) {
89
-        $applicant = Applicant::where('id', $applicant_id)->firstOrFail();
89
+        $applicant = Applicant::where ('id', $applicant_id)->firstOrFail ();
90 90
 
91
-        $snapshot = $applicant->replicate();
91
+        $snapshot = $applicant->replicate ();
92 92
 
93 93
     }
94 94
 
95 95
     public function applicant() {
96
-        return $this->belongsTo(\App\Models\Applicant::class);
96
+        return $this->belongsTo (\App\Models\Applicant::class);
97 97
     }
98 98
 
99 99
     public function applicant_snapshot() {
100
-        return $this->belongsTo(\App\Models\Applicant::class, 'applicant_snapshot_id');
100
+        return $this->belongsTo (\App\Models\Applicant::class, 'applicant_snapshot_id');
101 101
     }
102 102
 
103 103
     public function application_status() {
104
-        return $this->belongsTo(\App\Models\Lookup\ApplicationStatus::class);
104
+        return $this->belongsTo (\App\Models\Lookup\ApplicationStatus::class);
105 105
     }
106 106
 
107 107
     public function citizenship_declaration() {
108
-        return $this->belongsTo(\App\Models\Lookup\CitizenshipDeclaration::class);
108
+        return $this->belongsTo (\App\Models\Lookup\CitizenshipDeclaration::class);
109 109
     }
110 110
 
111 111
     public function veteran_status() {
112
-        return $this->belongsTo(\App\Models\Lookup\VeteranStatus::class);
112
+        return $this->belongsTo (\App\Models\Lookup\VeteranStatus::class);
113 113
     }
114 114
 
115 115
     public function preferred_language() {
116
-        return $this->belongsTo(\App\Models\Lookup\PreferredLanguage::class);
116
+        return $this->belongsTo (\App\Models\Lookup\PreferredLanguage::class);
117 117
     }
118 118
 
119 119
     public function job_poster() {
120
-        return $this->belongsTo(\App\Models\JobPoster::class);
120
+        return $this->belongsTo (\App\Models\JobPoster::class);
121 121
     }
122 122
 
123 123
     public function job_application_answers() {
124
-        return $this->hasMany(\App\Models\JobApplicationAnswer::class);
124
+        return $this->hasMany (\App\Models\JobApplicationAnswer::class);
125 125
     }
126 126
 
127 127
     public function skill_declarations() {
128
-        return $this->applicant->skill_declarations()
129
-            ->whereIn('skill_id', $this->job_poster->criteria->pluck('skill_id'));
128
+        return $this->applicant->skill_declarations ()
129
+            ->whereIn ('skill_id', $this->job_poster->criteria->pluck ('skill_id'));
130 130
     }
131 131
 
132 132
     public function application_review() {
133
-        return $this->hasOne(ApplicationReview::class);
133
+        return $this->hasOne (ApplicationReview::class);
134 134
     }
135 135
 
136 136
     /**
@@ -148,39 +148,39 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function getSectionStatus(string $section) {
150 150
         //TODO: determine whether sections are complete or invalid
151
-        $validator = new ApplicationValidator();
151
+        $validator = new ApplicationValidator ();
152 152
         $status = 'incomplete';
153
-        switch($section) {
153
+        switch ($section) {
154 154
             case 'basics':
155
-                if ($validator->basicsComplete($this)) {
155
+                if ($validator->basicsComplete ($this)) {
156 156
                     $status = 'complete';
157 157
                 }
158 158
                 break;
159 159
             case 'experience':
160
-                if ($validator->experienceComplete($this)) {
160
+                if ($validator->experienceComplete ($this)) {
161 161
                     $status = 'complete';
162 162
                 }
163 163
                 break;
164 164
             case 'essential_skills':
165
-                if ($validator->essentialSkillsComplete($this)) {
165
+                if ($validator->essentialSkillsComplete ($this)) {
166 166
                     $status = 'complete';
167 167
                 }
168 168
                 break;
169 169
             case 'asset_skills':
170
-                if ($validator->assetSkillsComplete($this)) {
170
+                if ($validator->assetSkillsComplete ($this)) {
171 171
                     $status = 'complete';
172 172
                 }
173 173
                 break;
174 174
             case 'preview':
175
-                if ($validator->basicsComplete($this) &&
176
-                    $validator->experienceComplete($this) &&
177
-                    $validator->essentialSkillsComplete($this) &&
178
-                    $validator->assetSkillsComplete($this)) {
175
+                if ($validator->basicsComplete ($this) &&
176
+                    $validator->experienceComplete ($this) &&
177
+                    $validator->essentialSkillsComplete ($this) &&
178
+                    $validator->assetSkillsComplete ($this)) {
179 179
                     $status = 'complete';
180 180
                 }
181 181
                 break;
182 182
             case 'confirm':
183
-                if ($validator->affirmationComplete($this)) {
183
+                if ($validator->affirmationComplete ($this)) {
184 184
                     $status = 'complete';
185 185
                 }
186 186
                 break;
@@ -200,13 +200,13 @@  discard block
 block discarded – undo
200 200
      */
201 201
     public function meetsEssentialCriteria(): bool
202 202
     {
203
-        $essentialCriteria = $this->job_poster->criteria->filter(
203
+        $essentialCriteria = $this->job_poster->criteria->filter (
204 204
             function ($value, $key) {
205 205
                 return $value->criteria_type->name == 'essential';
206 206
             }
207 207
         );
208 208
         foreach ($essentialCriteria as $criterion) {
209
-            $skillDeclaration = $this->skill_declarations->where("skill_id", $criterion->skill_id)->first();
209
+            $skillDeclaration = $this->skill_declarations->where ("skill_id", $criterion->skill_id)->first ();
210 210
             if ($skillDeclaration === null ||
211 211
                 $skillDeclaration->skill_level_id < $criterion->skill_level_id) {
212 212
                 return false;
@@ -223,6 +223,6 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public function getMeetsEssentialCriteriaAttribute():bool
225 225
     {
226
-        return $this->meetsEssentialCriteria();
226
+        return $this->meetsEssentialCriteria ();
227 227
     }
228 228
 }
Please login to merge, or discard this patch.
app/Models/Classification.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
 
28 28
     public function skills()
29 29
     {
30
-        return $this->belongsToMany(\App\Models\Skill::class)->withTimestamps();
30
+        return $this->belongsToMany (\App\Models\Skill::class)->withTimestamps ();
31 31
     }
32 32
 
33 33
     public function job_posters() //phpcs:ignore
34 34
     {
35
-        return $this->belongsToMany(\App\Models\JobPoster::class);
35
+        return $this->belongsToMany (\App\Models\JobPoster::class);
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
app/Models/WorkSample.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,16 +45,16 @@
 block discarded – undo
45 45
 
46 46
     public function file_type()
47 47
     {
48
-        return $this->belongsTo(\App\Models\Lookup\FileType::class);
48
+        return $this->belongsTo (\App\Models\Lookup\FileType::class);
49 49
     }
50 50
 
51 51
     public function skill_declarations()
52 52
     {
53
-        return $this->belongsToMany(\App\Models\SkillDeclaration::class);
53
+        return $this->belongsToMany (\App\Models\SkillDeclaration::class);
54 54
     }
55 55
 
56 56
     public function applicant()
57 57
     {
58
-        return $this->belongsTo(\App\Models\Applicant::class);
58
+        return $this->belongsTo (\App\Models\Applicant::class);
59 59
     }
60 60
 }
Please login to merge, or discard this patch.
app/Models/WorkExperience.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,6 +44,6 @@
 block discarded – undo
44 44
 
45 45
     public function applicant()
46 46
     {
47
-        return $this->belongsTo(\App\Models\Applicant::class);
47
+        return $this->belongsTo (\App\Models\Applicant::class);
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
app/Models/UserRole.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,6 +23,6 @@
 block discarded – undo
23 23
 
24 24
     public function users()
25 25
     {
26
-        return $this->hasMany(\App\Models\User::class);
26
+        return $this->hasMany (\App\Models\User::class);
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
app/Models/Skill.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,17 +60,17 @@  discard block
 block discarded – undo
60 60
 
61 61
     public function skill_type() // phpcs:ignore
62 62
     {
63
-        return $this->belongsTo(\App\Models\Lookup\SkillType::class);
63
+        return $this->belongsTo (\App\Models\Lookup\SkillType::class);
64 64
     }
65 65
 
66 66
     public function skill_declarations() // phpcs:ignore
67 67
     {
68
-        return $this->hasMany(\App\Models\SkillDeclaration::class);
68
+        return $this->hasMany (\App\Models\SkillDeclaration::class);
69 69
     }
70 70
 
71 71
     public function classifications() // phpcs:ignore
72 72
     {
73
-        return $this->belongsToMany(\App\Models\Classification::class)->withTimestamps();
73
+        return $this->belongsToMany (\App\Models\Classification::class)->withTimestamps ();
74 74
     }
75 75
 
76 76
     /**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function toArray() : array
113 113
     {
114
-        $array = parent::toArray();
114
+        $array = parent::toArray ();
115 115
         $array['name'] = $this->name;
116 116
         $array['description'] = $this->description;
117 117
         return $array;
Please login to merge, or discard this patch.
app/Models/Assessment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function criterion() // phpcs:ignore
39 39
     {
40
-        return $this->belongsTo(Criteria::class, 'criterion_id');
40
+        return $this->belongsTo (Criteria::class, 'criterion_id');
41 41
     }
42 42
 
43 43
     /**
@@ -47,6 +47,6 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function assessment_type() // phpcs:ignore
49 49
     {
50
-        return $this->belongsTo(AssessmentType::class);
50
+        return $this->belongsTo (AssessmentType::class);
51 51
     }
52 52
 }
Please login to merge, or discard this patch.
app/Models/Degree.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,11 +53,11 @@
 block discarded – undo
53 53
 
54 54
     public function degree_type()
55 55
     {
56
-        return $this->belongsTo(\App\Models\Lookup\DegreeType::class);
56
+        return $this->belongsTo (\App\Models\Lookup\DegreeType::class);
57 57
     }
58 58
 
59 59
     public function applicant()
60 60
     {
61
-        return $this->belongsTo(\App\Models\Applicant::class);
61
+        return $this->belongsTo (\App\Models\Applicant::class);
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
app/Models/RatingGuideAnswer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function rating_guide_question(): \Illuminate\Database\Eloquent\Relations\BelongsTo
52 52
     {
53
-        return $this->belongsTo(\App\Models\RatingGuideQuestion::class);
53
+        return $this->belongsTo (\App\Models\RatingGuideQuestion::class);
54 54
     }
55 55
 
56 56
     /**
@@ -60,6 +60,6 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function criterion(): \Illuminate\Database\Eloquent\Relations\BelongsTo
62 62
     {
63
-        return $this->belongsTo(\App\Models\Criteria::class, 'criterion_id');
63
+        return $this->belongsTo (\App\Models\Criteria::class, 'criterion_id');
64 64
     }
65 65
 }
Please login to merge, or discard this patch.