Passed
Push — task/common-translation-packag... ( 61d9a2...d137e8 )
by Grant
18:45 queued 08:27
created
app/Http/ViewComposers/GocComposer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
      * @param  View  $view
14 14
      * @return void
15 15
      */
16
-    public function compose(View $view)
16
+    public function compose (View $view)
17 17
     {
18
-        $view->with('goc', Lang::get('common/goc'));
18
+        $view->with ('goc', Lang::get ('common/goc'));
19 19
     }
20 20
 }
Please login to merge, or discard this patch.
app/Http/Controllers/ApplicationReviewController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -17,31 +17,31 @@
 block discarded – undo
17 17
      * @param  \App\Models\JobApplication $application Incoming Application.
18 18
      * @return \Illuminate\Http\Response
19 19
      */
20
-    public function updateForApplication(Request $request, JobApplication $application)
20
+    public function updateForApplication (Request $request, JobApplication $application)
21 21
     {
22
-        $request->validate([
22
+        $request->validate ([
23 23
             'review_status_id' => [
24 24
                 'nullable',
25
-                Rule::in(ReviewStatus::all()->pluck('id')->toArray())
25
+                Rule::in (ReviewStatus::all ()->pluck ('id')->toArray ())
26 26
             ],
27 27
             'notes' => 'nullable|string'
28 28
         ]);
29 29
 
30 30
         $review = $application->application_review;
31 31
         if ($review === null) {
32
-            $review = new ApplicationReview();
33
-            $review->job_application()->associate($application);
32
+            $review = new ApplicationReview ();
33
+            $review->job_application ()->associate ($application);
34 34
         }
35
-        $review->fill([
36
-            'review_status_id' => $request->input('review_status_id'),
37
-            'notes' => $request->input('notes'),
35
+        $review->fill ([
36
+            'review_status_id' => $request->input ('review_status_id'),
37
+            'notes' => $request->input ('notes'),
38 38
         ]);
39
-        $review->save();
39
+        $review->save ();
40 40
 
41
-        if ($request->ajax()) {
42
-            return $review->fresh()->toJson();
41
+        if ($request->ajax ()) {
42
+            return $review->fresh ()->toJson ();
43 43
         }
44 44
 
45
-        return redirect()->back();
45
+        return redirect ()->back ();
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
app/Http/Controllers/FaqController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@
 block discarded – undo
12 12
      *
13 13
      * @return View
14 14
      */
15
-    public function __invoke()
15
+    public function __invoke ()
16 16
     {
17
-        return view(
17
+        return view (
18 18
             'applicant/static_faq',
19 19
             [
20
-                'faq' => Lang::get('applicant/faq'),
21
-                'breadcrumb_home' => route('home'),
20
+                'faq' => Lang::get ('applicant/faq'),
21
+                'breadcrumb_home' => route ('home'),
22 22
                 'applicant_sidebar_active' => 'active',
23 23
             ]
24 24
         );
Please login to merge, or discard this patch.
app/Http/Controllers/AssessmentController.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -16,35 +16,35 @@  discard block
 block discarded – undo
16 16
      * @param  \Illuminate\Http\Request $request Incoming request.
17 17
      * @return \Illuminate\Http\Response
18 18
      */
19
-    public function store(Request $request)
19
+    public function store (Request $request)
20 20
     {
21
-        $this->authorize('create', Assessment::class);
21
+        $this->authorize ('create', Assessment::class);
22 22
 
23 23
         try {
24
-            $criterion_id = (int)$request->json('criterion_id');
25
-            $assessment_type_id = (int)$request->json('assessment_type_id');
26
-            $criteria = Criteria::findOrFail($criterion_id);
27
-            AssessmentType::findOrFail($assessment_type_id);
24
+            $criterion_id = (int) $request->json ('criterion_id');
25
+            $assessment_type_id = (int) $request->json ('assessment_type_id');
26
+            $criteria = Criteria::findOrFail ($criterion_id);
27
+            AssessmentType::findOrFail ($assessment_type_id);
28 28
 
29
-            $assessment = new Assessment([
29
+            $assessment = new Assessment ([
30 30
                 'criterion_id' => $criterion_id,
31 31
                 'assessment_type_id' => $assessment_type_id
32 32
             ]);
33 33
             // Check that this user is allowed to create an Assessment for this criterion.
34
-            $this->authorize('update', $assessment);
34
+            $this->authorize ('update', $assessment);
35 35
 
36
-            $assessment->save();
37
-            $assessment->refresh();
38
-            $assessment['criteria'] = $criteria->toArray();
36
+            $assessment->save ();
37
+            $assessment->refresh ();
38
+            $assessment['criteria'] = $criteria->toArray ();
39 39
         } catch (\Exception $e) {
40
-            return response()->json([
41
-                'error' => $e->getMessage()
40
+            return response ()->json ([
41
+                'error' => $e->getMessage ()
42 42
             ], 400);
43 43
         }
44 44
 
45 45
         return [
46 46
             'success' => "Successfully created assessment $assessment->id",
47
-            'assessment' => $assessment->toArray()
47
+            'assessment' => $assessment->toArray ()
48 48
         ];
49 49
     }
50 50
 
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
      * @param  \App\Models\Assessment $assessment Incoming object.
55 55
      * @return \Illuminate\Http\Response
56 56
      */
57
-    public function show(Assessment $assessment)
57
+    public function show (Assessment $assessment)
58 58
     {
59
-        $this->authorize('view', $assessment);
60
-        $criteria = Criteria::find($assessment->id);
61
-        $assessment['criteria'] = $criteria->toArray();
62
-        return $assessment->toArray();
59
+        $this->authorize ('view', $assessment);
60
+        $criteria = Criteria::find ($assessment->id);
61
+        $assessment['criteria'] = $criteria->toArray ();
62
+        return $assessment->toArray ();
63 63
     }
64 64
 
65 65
     /**
@@ -69,28 +69,28 @@  discard block
 block discarded – undo
69 69
      * @param  \App\Models\Assessment   $assessment Incoming object.
70 70
      * @return \Illuminate\Http\Response
71 71
      */
72
-    public function update(Request $request, Assessment $assessment)
72
+    public function update (Request $request, Assessment $assessment)
73 73
     {
74
-        $this->authorize('update', $assessment);
74
+        $this->authorize ('update', $assessment);
75 75
         try {
76
-            $criterion_id = (int)$request->json('criterion_id');
77
-            $assessment_type_id = (int)$request->json('assessment_type_id');
78
-            $criteria = Criteria::findOrFail($criterion_id);
79
-            AssessmentType::findOrFail($assessment_type_id);
76
+            $criterion_id = (int) $request->json ('criterion_id');
77
+            $assessment_type_id = (int) $request->json ('assessment_type_id');
78
+            $criteria = Criteria::findOrFail ($criterion_id);
79
+            AssessmentType::findOrFail ($assessment_type_id);
80 80
 
81 81
             $assessment->criterion_id = $criterion_id;
82 82
             $assessment->assessment_type_id = $assessment_type_id;
83
-            $assessment->save();
84
-            $assessment['criteria'] = $criteria->toArray();
83
+            $assessment->save ();
84
+            $assessment['criteria'] = $criteria->toArray ();
85 85
         } catch (\Exception $e) {
86
-            return response()->json([
87
-                'error' => $e->getMessage()
86
+            return response ()->json ([
87
+                'error' => $e->getMessage ()
88 88
             ], 400);
89 89
         }
90 90
 
91 91
         return [
92 92
             'success' => "Successfully updated assessment $assessment->id",
93
-            'assessment' => $assessment->toArray(),
93
+            'assessment' => $assessment->toArray (),
94 94
         ];
95 95
     }
96 96
 
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
      * @param  \App\Models\Assessment $assessment Incoming object.
101 101
      * @return \Illuminate\Http\Response
102 102
      */
103
-    public function destroy(Assessment $assessment)
103
+    public function destroy (Assessment $assessment)
104 104
     {
105
-        $this->authorize('delete', $assessment);
106
-        $assessment->delete();
105
+        $this->authorize ('delete', $assessment);
106
+        $assessment->delete ();
107 107
 
108 108
         return [
109 109
             'success' => "Successfully deleted assessment $assessment->id"
Please login to merge, or discard this patch.
app/Http/Controllers/AssessmentPlanNotificationController.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -14,15 +14,15 @@  discard block
 block discarded – undo
14 14
      * @param  \Illuminate\Http\Request $request Incoming request.
15 15
      * @return mixed
16 16
      */
17
-    public function index(Request $request)
17
+    public function index (Request $request)
18 18
     {
19 19
         $notificationsArray = [];
20
-        if ($request->has('job_poster_id') && $request->user() != null) {
21
-            $jobPosterId = $request->input('job_poster_id');
22
-            $notifications = AssessmentPlanNotification::where('job_poster_id', $jobPosterId)->get();
20
+        if ($request->has ('job_poster_id') && $request->user () != null) {
21
+            $jobPosterId = $request->input ('job_poster_id');
22
+            $notifications = AssessmentPlanNotification::where ('job_poster_id', $jobPosterId)->get ();
23 23
             foreach ($notifications as $notification) {
24
-                if ($request->user()->can('view', $notification)) {
25
-                    $notificationsArray[] = $notification->toArray();
24
+                if ($request->user ()->can ('view', $notification)) {
25
+                    $notificationsArray[] = $notification->toArray ();
26 26
                 }
27 27
             }
28 28
         }
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
      * @param  \App\Models\AssessmentPlanNotification $assessmentPlanNotification Incoming object.
36 36
      * @return mixed
37 37
      */
38
-    public function show(AssessmentPlanNotification $assessmentPlanNotification)
38
+    public function show (AssessmentPlanNotification $assessmentPlanNotification)
39 39
     {
40
-        $this->authorize('view', $assessmentPlanNotification);
41
-        return $assessmentPlanNotification->toArray();
40
+        $this->authorize ('view', $assessmentPlanNotification);
41
+        return $assessmentPlanNotification->toArray ();
42 42
     }
43 43
 
44 44
     /**
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
      * @throws \InvalidArgumentException For missing $question.
50 50
      * @return mixed
51 51
      */
52
-    public function update(Request $request, AssessmentPlanNotification $assessmentPlanNotification)
52
+    public function update (Request $request, AssessmentPlanNotification $assessmentPlanNotification)
53 53
     {
54
-        $this->authorize('update', $assessmentPlanNotification);
55
-        $assessmentPlanNotification->fill([
56
-            'acknowledged' => $request->input('acknowledged')
54
+        $this->authorize ('update', $assessmentPlanNotification);
55
+        $assessmentPlanNotification->fill ([
56
+            'acknowledged' => $request->input ('acknowledged')
57 57
         ]);
58
-        $assessmentPlanNotification->save();
58
+        $assessmentPlanNotification->save ();
59 59
 
60 60
         return [
61 61
             'success' => "Successfully updated assessment plan notification $assessmentPlanNotification->id",
62
-            'assessment_plan_notification' => $assessmentPlanNotification->toArray(),
62
+            'assessment_plan_notification' => $assessmentPlanNotification->toArray (),
63 63
         ];
64 64
     }
65 65
 
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
      * @param  \App\Models\AssessmentPlanNotification $assessmentPlanNotification Incoming object.
70 70
      * @return mixed
71 71
      */
72
-    public function destroy(AssessmentPlanNotification $assessmentPlanNotification)
72
+    public function destroy (AssessmentPlanNotification $assessmentPlanNotification)
73 73
     {
74
-        $this->authorize('delete', $assessmentPlanNotification);
75
-        $assessmentPlanNotification->delete();
74
+        $this->authorize ('delete', $assessmentPlanNotification);
75
+        $assessmentPlanNotification->delete ();
76 76
 
77 77
         return [
78 78
             'success' => "Successfully deleted assessment plan notification $assessmentPlanNotification->id"
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/UserCrudController.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -16,70 +16,70 @@  discard block
 block discarded – undo
16 16
      *
17 17
      * @return void
18 18
      */
19
-    public function setup() : void
19
+    public function setup () : void
20 20
     {
21
-        $this->crud->setModel('App\Models\User');
22
-        $this->crud->setRoute('admin/user');
23
-        $this->crud->setEntityNameStrings('user', 'users');
21
+        $this->crud->setModel ('App\Models\User');
22
+        $this->crud->setRoute ('admin/user');
23
+        $this->crud->setEntityNameStrings ('user', 'users');
24 24
     }
25 25
 
26
-    public function setupListOperation()
26
+    public function setupListOperation ()
27 27
     {
28
-        $this->crud->addColumn([
28
+        $this->crud->addColumn ([
29 29
             'name' => 'id',
30 30
             'type' => 'number',
31 31
             'label' => 'ID'
32 32
         ]);
33
-        $this->crud->addColumn([
33
+        $this->crud->addColumn ([
34 34
             'name' => 'first_name',
35 35
             'type' => 'text',
36 36
             'label' => 'First Name'
37 37
         ]);
38
-        $this->crud->addColumn([
38
+        $this->crud->addColumn ([
39 39
             'name' => 'last_name',
40 40
             'type' => 'text',
41 41
             'label' => 'Last Name'
42 42
         ]);
43
-        $this->crud->addColumn([
43
+        $this->crud->addColumn ([
44 44
             'name' => 'user_role.name',
45 45
             'type' => 'text',
46 46
             'key' => 'user_role_name',
47 47
             'label' => 'Role'
48 48
         ]);
49
-        $this->crud->addColumn([
49
+        $this->crud->addColumn ([
50 50
             'name' => 'email',
51 51
             'type' => 'text',
52 52
             'label' => 'Email'
53 53
         ]);
54
-        $this->crud->addColumn([
54
+        $this->crud->addColumn ([
55 55
             'name' => 'gov_email',
56 56
             'type' => 'text',
57 57
             'label' => 'Government Email'
58 58
         ]);
59
-        $this->crud->addColumn([
59
+        $this->crud->addColumn ([
60 60
             'name' => 'not_in_gov',
61 61
             'type' => 'check',
62 62
             'label' => 'In Government'
63 63
         ]);
64
-        $this->crud->addColumn([
64
+        $this->crud->addColumn ([
65 65
             'name' => 'is_priority',
66 66
             'type' => 'check',
67 67
             'label' => 'Priority'
68 68
         ]);
69
-        $this->crud->addFilter([
69
+        $this->crud->addFilter ([
70 70
             'name' => 'user_role',
71 71
             'type' => 'select2',
72 72
             'label' => 'Role'
73 73
             ], function () {
74
-                return UserRole::all()->keyBy('id')->pluck('name', 'id')->toArray();
74
+                return UserRole::all ()->keyBy ('id')->pluck ('name', 'id')->toArray ();
75 75
             }, function ($value) : void {
76
-                $this->crud->addClause('where', 'user_role_id', $value);
76
+                $this->crud->addClause ('where', 'user_role_id', $value);
77 77
             });
78 78
     }
79 79
 
80
-    public function setupUpdateOperation()
80
+    public function setupUpdateOperation ()
81 81
     {
82
-        $this->crud->addField([
82
+        $this->crud->addField ([
83 83
             'name' => 'name',
84 84
             'label' => 'Name',
85 85
             'type' => 'text',
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 'readonly'=>'readonly'
88 88
             ]
89 89
         ]);
90
-        $this->crud->addField([
90
+        $this->crud->addField ([
91 91
             'label' => 'Role',
92 92
             'type' => 'select',
93 93
             'name' => 'user_role_id', // The db column for the foreign key.
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             'attribute' => 'name', // Foreign key attribute that is shown to user.
96 96
             'model' => 'App\Models\UserRole' // Foreign key model.
97 97
         ]);
98
-        $this->crud->addField([
98
+        $this->crud->addField ([
99 99
             'name' => 'is_priority',
100 100
             'type' => 'checkbox',
101 101
             'label' => 'Priority'
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/SkillCrudController.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -22,41 +22,41 @@  discard block
 block discarded – undo
22 22
      *
23 23
      * @return void
24 24
      */
25
-    public function setup() : void
25
+    public function setup () : void
26 26
     {
27 27
         // Eloquent model to associate with this collection
28 28
         // of views and controller actions.
29
-        $this->crud->setModel('App\Models\Skill');
29
+        $this->crud->setModel ('App\Models\Skill');
30 30
         // Custom backpack route.
31
-        $this->crud->setRoute('admin/skill');
31
+        $this->crud->setRoute ('admin/skill');
32 32
         // Custom strings to display within the backpack UI,
33 33
         // things like Create Skill, Delete Skills, etc.
34
-        $this->crud->setEntityNameStrings('skill', 'skills');
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
-            $this->crud->addField([
38
+            $this->crud->addField ([
39 39
                 'name' => 'name',
40 40
                 'type' => 'text',
41 41
                 'label' => 'Name',
42 42
             ]);
43 43
 
44
-            $this->crud->addField([
44
+            $this->crud->addField ([
45 45
                 'name' => 'description',
46 46
                 'type' => 'textarea',
47 47
                 'label' => 'Description',
48 48
                 'limit' => 70,
49 49
             ]);
50 50
 
51
-            $this->crud->addField([
51
+            $this->crud->addField ([
52 52
                 'name' => 'skill_type_id',
53 53
                 'label' => 'Type',
54 54
                 'type' => 'select_from_array',
55
-                'options' => SkillType::all()->pluck('name', 'id')->toArray(),
55
+                'options' => SkillType::all ()->pluck ('name', 'id')->toArray (),
56 56
                 'allow_null' => false,
57 57
             ]);
58 58
 
59
-            $this->crud->addField([
59
+            $this->crud->addField ([
60 60
                 'name' => 'classifications',
61 61
                 'type' => 'select2_multiple',
62 62
                 'label' => 'Classifications (select all that apply)',
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
                 'pivot' => true,
67 67
             ]);
68 68
 
69
-            $this->crud->addField([
69
+            $this->crud->addField ([
70 70
                 'name' => 'is_culture_skill',
71 71
                 'label' => 'This is a culture skill',
72 72
                 'type' => 'checkbox'
73 73
             ]);
74 74
 
75
-            $this->crud->addField([
75
+            $this->crud->addField ([
76 76
                 'name' => 'is_future_skill',
77 77
                 'label' => 'This is a future skill',
78 78
                 'type' => 'checkbox'
@@ -80,61 +80,61 @@  discard block
 block discarded – undo
80 80
         });
81 81
     }
82 82
 
83
-    public function setupListOperation()
83
+    public function setupListOperation ()
84 84
     {
85 85
         // Workaround for how the unique_translation validation
86 86
         // works in App\Http\Requests\SkillCrudRequest.
87 87
         $locale = 'en';
88
-        if (null !== $this->request->input('locale')) {
89
-            $locale = $this->request->input('locale');
88
+        if (null !== $this->request->input ('locale')) {
89
+            $locale = $this->request->input ('locale');
90 90
         }
91
-        App::setLocale($locale);
91
+        App::setLocale ($locale);
92 92
 
93 93
         // Remove delete button.
94
-        $this->crud->removeButton('delete');
94
+        $this->crud->removeButton ('delete');
95 95
 
96 96
         // Add custom columns to the Skill index view.
97
-        $this->crud->addColumn([
97
+        $this->crud->addColumn ([
98 98
             'name' => 'id',
99 99
             'type' => 'text',
100 100
             'label' => 'ID',
101 101
             'orderable' => true
102 102
         ]);
103 103
 
104
-        $this->crud->addColumn([
104
+        $this->crud->addColumn ([
105 105
             'name' => 'name',
106 106
             'type' => 'text',
107 107
             'label' => 'Name',
108 108
             'searchLogic' => function ($query, $column, $searchTerm) use ($locale) : void {
109
-                $query->orWhere('name->' . $locale, 'like', "%$searchTerm%");
109
+                $query->orWhere ('name->'.$locale, 'like', "%$searchTerm%");
110 110
             },
111 111
             'orderLogic' => function ($query, $column, $columnDirection) use ($locale) {
112
-                return $query->orderBy('name->' . $locale, $columnDirection)->select('*');
112
+                return $query->orderBy ('name->'.$locale, $columnDirection)->select ('*');
113 113
             }
114 114
         ]);
115 115
 
116
-        $this->crud->addColumn([
116
+        $this->crud->addColumn ([
117 117
             'name' => 'description',
118 118
             'type' => 'text',
119 119
             'label' => 'Description',
120 120
             'searchLogic' => function ($query, $column, $searchTerm) use ($locale) : void {
121
-                $query->orWhere('description->' . $locale, 'like', "%$searchTerm%");
121
+                $query->orWhere ('description->'.$locale, 'like', "%$searchTerm%");
122 122
             },
123 123
             'orderable' => false,
124 124
         ]);
125 125
 
126
-        $this->crud->addColumn([
126
+        $this->crud->addColumn ([
127 127
             'name' => 'skill_type.name',
128 128
             'key' => 'skill_type_name',
129 129
             'type' => 'text',
130 130
             'label' => 'Type',
131 131
             'orderable' => true,
132 132
             'orderLogic' => function ($query, $column, $columnDirection) use ($locale) {
133
-                return $query->orderBy('skill_type_id', $columnDirection)->select('*');
133
+                return $query->orderBy ('skill_type_id', $columnDirection)->select ('*');
134 134
             }
135 135
         ]);
136 136
 
137
-        $this->crud->addColumn([
137
+        $this->crud->addColumn ([
138 138
             'label' => 'Classifications',
139 139
             'type' => 'select_multiple',
140 140
             'name' => 'classifications',
@@ -143,14 +143,14 @@  discard block
 block discarded – undo
143 143
             'model' => 'App\Models\Skill',
144 144
         ]);
145 145
 
146
-        $this->crud->addColumn([
146
+        $this->crud->addColumn ([
147 147
             'name' => 'is_culture_skill',
148 148
             'label' => 'Culture',
149 149
             'type' => 'boolean',
150 150
             'orderable' => true,
151 151
         ]);
152 152
 
153
-        $this->crud->addColumn([
153
+        $this->crud->addColumn ([
154 154
             'name' => 'is_future_skill',
155 155
             'label' => 'Future',
156 156
             'type' => 'boolean',
@@ -158,25 +158,25 @@  discard block
 block discarded – undo
158 158
         ]);
159 159
 
160 160
         // Add select2_multiple filter for classifications.
161
-        $this->crud->addFilter([
161
+        $this->crud->addFilter ([
162 162
             'name' => 'classifications',
163 163
             'key' => 'classifications_filter',
164 164
             'type' => 'select2_multiple',
165 165
             'label' => 'Filter by classification'
166 166
         ], function () {
167 167
             // The options that show up in the select2.
168
-            return Classification::all()->pluck('key', 'id')->toArray();
168
+            return Classification::all ()->pluck ('key', 'id')->toArray ();
169 169
         }, function ($values) {
170 170
             // If the filter is active.
171
-            foreach (json_decode($values) as $key => $value) {
172
-                $this->crud->query = $this->crud->query->whereHas('classifications', function ($query) use ($value) {
173
-                    $query->where('id', $value);
171
+            foreach (json_decode ($values) as $key => $value) {
172
+                $this->crud->query = $this->crud->query->whereHas ('classifications', function ($query) use ($value) {
173
+                    $query->where ('id', $value);
174 174
                 });
175 175
             }
176 176
         });
177 177
 
178 178
         // Add filter for skills without classifications.
179
-        $this->crud->addFilter(
179
+        $this->crud->addFilter (
180 180
             [
181 181
                 'type' => 'simple',
182 182
                 'name' => 'noClassification',
@@ -184,18 +184,18 @@  discard block
 block discarded – undo
184 184
             ],
185 185
             false,
186 186
             function () {
187
-                $this->crud->query = $this->crud->query->doesntHave('classifications');
187
+                $this->crud->query = $this->crud->query->doesntHave ('classifications');
188 188
             }
189 189
         );
190 190
     }
191 191
 
192
-    public function setupCreateOperation()
192
+    public function setupCreateOperation ()
193 193
     {
194
-        $this->crud->setValidation(StoreRequest::class);
194
+        $this->crud->setValidation (StoreRequest::class);
195 195
     }
196 196
 
197
-    public function setupUpdateOperation()
197
+    public function setupUpdateOperation ()
198 198
     {
199
-        $this->crud->setValidation(UpdateRequest::class);
199
+        $this->crud->setValidation (UpdateRequest::class);
200 200
     }
201 201
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/DepartmentCrudController.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -20,29 +20,29 @@  discard block
 block discarded – undo
20 20
      *
21 21
      * @return void
22 22
      */
23
-    public function setup() : void
23
+    public function setup () : void
24 24
     {
25 25
         // Eloquent model to associate with this collection of views and controller actions.
26
-        $this->crud->setModel('App\Models\Lookup\Department');
26
+        $this->crud->setModel ('App\Models\Lookup\Department');
27 27
         // Custom backpack route.
28
-        $this->crud->setRoute('admin/department');
28
+        $this->crud->setRoute ('admin/department');
29 29
         // Custom strings to display within the backpack UI.
30
-        $this->crud->setEntityNameStrings('department', 'departments');
30
+        $this->crud->setEntityNameStrings ('department', 'departments');
31 31
 
32
-        $this->crud->operation(['create', 'update'], function () {
33
-            $this->crud->addField([
32
+        $this->crud->operation (['create', 'update'], function () {
33
+            $this->crud->addField ([
34 34
                 'name' => 'name',
35 35
                 'type' => 'text',
36 36
                 'label' => 'Name',
37 37
             ]);
38 38
 
39
-            $this->crud->addField([
39
+            $this->crud->addField ([
40 40
                 'name' => 'impact',
41 41
                 'type' => 'textarea',
42 42
                 'label' => 'Impact',
43 43
             ]);
44 44
 
45
-            $this->crud->addField([
45
+            $this->crud->addField ([
46 46
                 'name' => 'preference',
47 47
                 'type' => 'textarea',
48 48
                 'label' => 'Preference',
@@ -50,38 +50,38 @@  discard block
 block discarded – undo
50 50
         });
51 51
     }
52 52
 
53
-    public function setupListOperation()
53
+    public function setupListOperation ()
54 54
     {
55 55
         // Required for order logic.
56 56
         $locale = 'en';
57
-        if (null !== $this->request->input('locale')) {
58
-            $locale = $this->request->input('locale');
57
+        if (null !== $this->request->input ('locale')) {
58
+            $locale = $this->request->input ('locale');
59 59
         }
60
-        App::setLocale($locale);
60
+        App::setLocale ($locale);
61 61
 
62 62
         // Remove delete button.
63
-        $this->crud->removeButton('delete');
63
+        $this->crud->removeButton ('delete');
64 64
 
65 65
         // Add custom columns to the Department index view.
66
-        $this->crud->addColumn([
66
+        $this->crud->addColumn ([
67 67
             'name' => 'id',
68 68
             'type' => 'text',
69 69
             'label' => 'ID',
70 70
             'orderable' => true,
71 71
         ]);
72 72
 
73
-        $this->crud->addColumn([
73
+        $this->crud->addColumn ([
74 74
             'name' => 'name',
75 75
             'type' => 'text',
76 76
             'label' => 'Name',
77 77
             'orderable' => true,
78 78
             'limit' => 70,
79 79
             'orderLogic' => function ($query, $column, $columnDirection) use ($locale) {
80
-                return $query->orderBy('name->' . $locale, $columnDirection)->select('*');
80
+                return $query->orderBy ('name->'.$locale, $columnDirection)->select ('*');
81 81
             }
82 82
         ]);
83 83
 
84
-        $this->crud->addColumn([
84
+        $this->crud->addColumn ([
85 85
             'name' => 'impact',
86 86
             'type' => 'text',
87 87
             'label' => 'Impact',
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             'limit' => 70,
90 90
         ]);
91 91
 
92
-        $this->crud->addColumn([
92
+        $this->crud->addColumn ([
93 93
             'name' => 'preference',
94 94
             'type' => 'text',
95 95
             'label' => 'Preference',
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
         ]);
99 99
     }
100 100
 
101
-    public function setupCreateOperation()
101
+    public function setupCreateOperation ()
102 102
     {
103
-        $this->crud->setValidation(StoreRequest::class);
103
+        $this->crud->setValidation (StoreRequest::class);
104 104
     }
105 105
 
106
-    public function setupUpdateOperation()
106
+    public function setupUpdateOperation ()
107 107
     {
108
-        $this->crud->setValidation(UpdateRequest::class);
108
+        $this->crud->setValidation (UpdateRequest::class);
109 109
     }
110 110
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ClassificationCrudController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@  discard block
 block discarded – undo
18 18
      *
19 19
      * @return void
20 20
      */
21
-    public function setup() : void
21
+    public function setup () : void
22 22
     {
23 23
         // Eloquent model to associate with this collection of views and controller actions.
24
-        $this->crud->setModel('App\Models\Classification');
24
+        $this->crud->setModel ('App\Models\Classification');
25 25
         // Custom backpack route.
26
-        $this->crud->setRoute('admin/classification');
26
+        $this->crud->setRoute ('admin/classification');
27 27
         // Custom strings to display within the backpack UI.
28
-        $this->crud->setEntityNameStrings('classification', 'classifications');
28
+        $this->crud->setEntityNameStrings ('classification', 'classifications');
29 29
 
30
-        $this->crud->operation(['create', 'update'], function () {
31
-            $this->crud->addField([
30
+        $this->crud->operation (['create', 'update'], function () {
31
+            $this->crud->addField ([
32 32
                 'name' => 'key',
33 33
                 'type' => 'text',
34 34
                 'label' => 'Key',
@@ -36,28 +36,28 @@  discard block
 block discarded – undo
36 36
         });
37 37
     }
38 38
 
39
-    public function setupListOperation()
39
+    public function setupListOperation ()
40 40
     {
41
-        $this->crud->addColumn([
41
+        $this->crud->addColumn ([
42 42
             'name' => 'id',
43 43
             'type' => 'text',
44 44
             'label' => 'ID',
45 45
         ]);
46 46
 
47
-        $this->crud->addColumn([
47
+        $this->crud->addColumn ([
48 48
             'name' => 'key',
49 49
             'type' => 'text',
50 50
             'label' => 'Key',
51 51
         ]);
52 52
     }
53 53
 
54
-    public function setupCreateOperation()
54
+    public function setupCreateOperation ()
55 55
     {
56
-        $this->crud->setValidation(StoreRequest::class);
56
+        $this->crud->setValidation (StoreRequest::class);
57 57
     }
58 58
 
59
-    public function setupUpdateOperation()
59
+    public function setupUpdateOperation ()
60 60
     {
61
-        $this->crud->setValidation(UpdateRequest::class);
61
+        $this->crud->setValidation (UpdateRequest::class);
62 62
     }
63 63
 }
Please login to merge, or discard this patch.