Passed
Push — feature/immutable-application-... ( d4dc87...b29460 )
by Grant
08:27
created
app/Http/Controllers/JobController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,12 +126,12 @@
 block discarded – undo
126 126
         // TODO: replace route('manager.show',manager.id) in templates with link using slug.
127 127
         $criteria = [
128 128
             'essential' => $jobPoster->criteria->filter(
129
-                function ($value, $key) {
129
+                function($value, $key) {
130 130
                     return $value->criteria_type->name == 'essential';
131 131
                 }
132 132
             ),
133 133
             'asset' => $jobPoster->criteria->filter(
134
-                function ($value, $key) {
134
+                function($value, $key) {
135 135
                     return $value->criteria_type->name == 'asset';
136 136
                 }
137 137
             ),
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ClassificationCrudController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
         // Custom strings to display within the backpack UI.
28 28
         $this->crud->setEntityNameStrings('classification', 'classifications');
29 29
 
30
-        $this->crud->operation(['create', 'update'], function () {
30
+        $this->crud->operation(['create', 'update'], function() {
31 31
             $this->crud->addField([
32 32
                 'name' => 'key',
33 33
                 'type' => 'text',
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/SkillCrudController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         // things like Create Skill, Delete Skills, etc.
34 34
         $this->crud->setEntityNameStrings('skill', 'skills');
35 35
 
36
-        $this->crud->operation(['create', 'update'], function () {
36
+        $this->crud->operation(['create', 'update'], function() {
37 37
             // Add custom fields to the create/update views.
38 38
             $this->crud->addField([
39 39
                 'name' => 'name',
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
             'name' => 'name',
106 106
             'type' => 'text',
107 107
             'label' => 'Name',
108
-            'searchLogic' => function ($query, $column, $searchTerm) use ($locale) : void {
109
-                $query->orWhere('name->' . $locale, 'like', "%$searchTerm%");
108
+            'searchLogic' => function($query, $column, $searchTerm) use ($locale) : void {
109
+                $query->orWhere('name->'.$locale, 'like', "%$searchTerm%");
110 110
             },
111
-            'orderLogic' => function ($query, $column, $columnDirection) use ($locale) {
112
-                return $query->orderBy('name->' . $locale, $columnDirection)->select('*');
111
+            'orderLogic' => function($query, $column, $columnDirection) use ($locale) {
112
+                return $query->orderBy('name->'.$locale, $columnDirection)->select('*');
113 113
             }
114 114
         ]);
115 115
 
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
             'name' => 'description',
118 118
             'type' => 'text',
119 119
             'label' => 'Description',
120
-            'searchLogic' => function ($query, $column, $searchTerm) use ($locale) : void {
121
-                $query->orWhere('description->' . $locale, 'like', "%$searchTerm%");
120
+            'searchLogic' => function($query, $column, $searchTerm) use ($locale) : void {
121
+                $query->orWhere('description->'.$locale, 'like', "%$searchTerm%");
122 122
             },
123 123
             'orderable' => false,
124 124
         ]);
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             'type' => 'text',
130 130
             'label' => 'Type',
131 131
             'orderable' => true,
132
-            'orderLogic' => function ($query, $column, $columnDirection) use ($locale) {
132
+            'orderLogic' => function($query, $column, $columnDirection) use ($locale) {
133 133
                 return $query->orderBy('skill_type_id', $columnDirection)->select('*');
134 134
             }
135 135
         ]);
@@ -163,13 +163,13 @@  discard block
 block discarded – undo
163 163
             'key' => 'classifications_filter',
164 164
             'type' => 'select2_multiple',
165 165
             'label' => 'Filter by classification'
166
-        ], function () {
166
+        ], function() {
167 167
             // The options that show up in the select2.
168 168
             return Classification::all()->pluck('key', 'id')->toArray();
169
-        }, function ($values) {
169
+        }, function($values) {
170 170
             // If the filter is active.
171 171
             foreach (json_decode($values) as $key => $value) {
172
-                $this->crud->query = $this->crud->query->whereHas('classifications', function ($query) use ($value) {
172
+                $this->crud->query = $this->crud->query->whereHas('classifications', function($query) use ($value) {
173 173
                     $query->where('id', $value);
174 174
                 });
175 175
             }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                 'label'=> 'No classification'
184 184
             ],
185 185
             false,
186
-            function () {
186
+            function() {
187 187
                 $this->crud->query = $this->crud->query->doesntHave('classifications');
188 188
             }
189 189
         );
Please login to merge, or discard this patch.
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/Admin/JobPosterCrudController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
             'type' => 'closure',
64 64
             'label' => 'Manager',
65 65
             'orderable' => false,
66
-            'function' => function ($entry) {
67
-                return '<a href="' . route('manager.profile.edit', $entry->manager->user->id) . '" target="_blank">' . $entry->manager->user->full_name . '</a>';
66
+            'function' => function($entry) {
67
+                return '<a href="'.route('manager.profile.edit', $entry->manager->user->id).'" target="_blank">'.$entry->manager->user->full_name.'</a>';
68 68
             }
69 69
         ]);
70 70
         $this->crud->addColumn([
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
             'name' => 'departments',
85 85
             'type' => 'select2_multiple',
86 86
             'label' => 'Departments'
87
-        ], function () {
87
+        ], function() {
88 88
             return Department::all()->pluck('name', 'id')->toArray();
89
-        }, function ($values) {
90
-            $this->crud->addClause('WhereHas', 'department', function ($query) use ($values) {
89
+        }, function($values) {
90
+            $this->crud->addClause('WhereHas', 'department', function($query) use ($values) {
91 91
                 foreach (json_decode($values) as $key => $value) {
92 92
                     if ($key === 0) {
93 93
                         $query->where('id', $value);
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/DepartmentCrudController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         // Custom strings to display within the backpack UI.
30 30
         $this->crud->setEntityNameStrings('department', 'departments');
31 31
 
32
-        $this->crud->operation(['create', 'update'], function () {
32
+        $this->crud->operation(['create', 'update'], function() {
33 33
             $this->crud->addField([
34 34
                 'name' => 'name',
35 35
                 'type' => 'text',
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
             'label' => 'Name',
77 77
             'orderable' => true,
78 78
             'limit' => 70,
79
-            'orderLogic' => function ($query, $column, $columnDirection) use ($locale) {
80
-                return $query->orderBy('name->' . $locale, $columnDirection)->select('*');
79
+            'orderLogic' => function($query, $column, $columnDirection) use ($locale) {
80
+                return $query->orderBy('name->'.$locale, $columnDirection)->select('*');
81 81
             }
82 82
         ]);
83 83
 
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/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.