Passed
Push — dev ( 8234f4...4fa166 )
by Tristan
08:41
created
app/Http/Controllers/Admin/UserCrudController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,9 +70,9 @@
 block discarded – undo
70 70
             'name' => 'user_role',
71 71
             'type' => 'select2',
72 72
             'label' => 'Role'
73
-            ], function () {
73
+            ], function(){
74 74
                 return UserRole::all()->keyBy('id')->pluck('name', 'id')->toArray();
75
-            }, function ($value) : void {
75
+            }, function($value) : void {
76 76
                 $this->crud->addClause('where', 'user_role_id', $value);
77 77
             });
78 78
     }
Please login to merge, or discard this patch.
app/Http/Controllers/ApplicationController.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,18 +40,17 @@
 block discarded – undo
40 40
     public function show(JobApplication $application)
41 41
     {
42 42
         $criteria = [
43
-            'essential' => $application->job_poster->criteria->filter(function ($value, $key) {
43
+            'essential' => $application->job_poster->criteria->filter(function($value, $key){
44 44
                 return $value->criteria_type->name == 'essential';
45 45
             }),
46
-            'asset' => $application->job_poster->criteria->filter(function ($value, $key) {
46
+            'asset' => $application->job_poster->criteria->filter(function($value, $key){
47 47
                 return $value->criteria_type->name == 'asset';
48 48
             }),
49 49
         ];
50 50
 
51 51
         // Display slightly different views on different portals.
52 52
         $view = WhichPortal::isManagerPortal() ?
53
-            'manager/application_post' :
54
-            'applicant/application_preview';
53
+            'manager/application_post' : 'applicant/application_preview';
55 54
 
56 55
         if (WhichPortal::isManagerPortal()) {
57 56
             // Load things required for review component.
Please login to merge, or discard this patch.
app/Http/Controllers/Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
     {
108 108
         $rotatedArray = [];
109 109
         foreach ($expandedArray as $item) {
110
-            for ($i=0; $i<$steps; $i++) {
110
+            for ($i = 0; $i < $steps; $i++) {
111 111
                 array_push($item['keys'], array_shift($item['keys']));
112 112
             }
113 113
             $rotatedArray[] = $item;
Please login to merge, or discard this patch.
app/Http/Controllers/ApplicationByJobController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -159,10 +159,10 @@  discard block
 block discarded – undo
159 159
         $this->authorize('update', $application);
160 160
 
161 161
         $criteria = [
162
-            'essential' => $jobPoster->criteria->filter(function ($value, $key) {
162
+            'essential' => $jobPoster->criteria->filter(function($value, $key){
163 163
                 return $value->criteria_type->name == 'essential';
164 164
             }),
165
-            'asset' => $jobPoster->criteria->filter(function ($value, $key) {
165
+            'asset' => $jobPoster->criteria->filter(function($value, $key){
166 166
                 return $value->criteria_type->name == 'asset';
167 167
             }),
168 168
         ];
@@ -204,10 +204,10 @@  discard block
 block discarded – undo
204 204
         $this->authorize('update', $application);
205 205
 
206 206
         $criteria = [
207
-            'essential' => $jobPoster->criteria->filter(function ($value, $key) {
207
+            'essential' => $jobPoster->criteria->filter(function($value, $key){
208 208
                 return $value->criteria_type->name == 'essential';
209 209
             }),
210
-            'asset' => $jobPoster->criteria->filter(function ($value, $key) {
210
+            'asset' => $jobPoster->criteria->filter(function($value, $key){
211 211
                 return $value->criteria_type->name == 'asset';
212 212
             }),
213 213
         ];
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
 
247 247
         $this->authorize('view', $application);
248 248
         $criteria = [
249
-            'essential' => $jobPoster->criteria->filter(function ($value, $key) {
249
+            'essential' => $jobPoster->criteria->filter(function($value, $key){
250 250
                 return $value->criteria_type->name == 'essential';
251 251
             }),
252
-            'asset' => $jobPoster->criteria->filter(function ($value, $key) {
252
+            'asset' => $jobPoster->criteria->filter(function($value, $key){
253 253
                 return $value->criteria_type->name == 'asset';
254 254
             }),
255 255
         ];
Please login to merge, or discard this patch.
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/PasswordFormatRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@
 block discarded – undo
19 19
      * https://laraveldaily.com/how-to-create-custom-validation-rules-laravel/
20 20
      */
21 21
 
22
-    public function passes($attribute, $value) {
22
+    public function passes($attribute, $value){
23 23
         $passwordPattern = "~^.*(?=.{3,})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[.!@#$%^&*]).*$~";
24 24
         return preg_match($passwordPattern, $value);
25 25
     }
26 26
 
27
-    public function message() {
27
+    public function message(){
28 28
         return Lang::get('validation.custom.password');
29 29
     }
30 30
 
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/Services/Validation/JobApplicationAnswerValidator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  discard block
 block discarded – undo
7 7
 use Illuminate\Support\Facades\Validator;
8 8
 use Illuminate\Validation\Rule;
9 9
 
10
-class JobApplicationAnswerValidator {
10
+class JobApplicationAnswerValidator{
11 11
 
12 12
     protected $application;
13 13
     protected $questionIds;
14 14
 
15
-    public function __construct(JobApplication $application) {
15
+    public function __construct(JobApplication $application){
16 16
         $this->application = $application;
17 17
         $this->questionIds = $application->job_poster->job_poster_questions->pluck('id')->toArray();
18 18
     }
19 19
 
20
-    public function rules() {
20
+    public function rules(){
21 21
         $rules = [
22 22
             'answer' => 'required|string',
23 23
             'job_poster_question_id' => [
@@ -32,17 +32,17 @@  discard block
 block discarded – undo
32 32
         return $rules;
33 33
     }
34 34
 
35
-    public function validator(JobApplicationAnswer $answer) {
35
+    public function validator(JobApplicationAnswer $answer){
36 36
 
37 37
 
38 38
         return Validator::make($answer->toArray(), $this->rules());
39 39
     }
40 40
 
41
-    public function validate(JobApplicationAnswer $answer) {
41
+    public function validate(JobApplicationAnswer $answer){
42 42
         return $this->validator($answer)->validate();
43 43
     }
44 44
 
45
-    public function isComplete(JobApplicationAnswer $answer) {
45
+    public function isComplete(JobApplicationAnswer $answer){
46 46
         return $this->validator($answer)->passes();
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
app/Services/Validation/PasswordValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         ];
22 22
     }
23 23
 
24
-    public function messages() {
24
+    public function messages(){
25 25
         return Lang::get('validation.custom.password');
26 26
     }
27 27
 }
Please login to merge, or discard this patch.