@@ -187,7 +187,7 @@ |
||
187 | 187 | public function getFullNameAttribute(): string |
188 | 188 | { |
189 | 189 | if ($this->user !== null) { |
190 | - return $this->user->first_name . ' ' . $this->user->last_name; |
|
190 | + return $this->user->first_name.' '.$this->user->last_name; |
|
191 | 191 | } |
192 | 192 | return ''; |
193 | 193 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | //Log when application is first created |
41 | - if($application->wasRecentlyCreated) { |
|
41 | + if ($application->wasRecentlyCreated) { |
|
42 | 42 | $applicationText = "{id=".$application->id.", status=".$application->application_status->name."}"; |
43 | 43 | |
44 | 44 | Log::notice("Application created: application ".$applicationText." has been created by user ".$userText); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function passes($attribute, $value) |
25 | 25 | { |
26 | - return preg_match('/' . self::PATTERN . '/', $value); |
|
26 | + return preg_match('/'.self::PATTERN.'/', $value); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -60,7 +60,7 @@ |
||
60 | 60 | // search $needle in process status |
61 | 61 | $result = array_filter( |
62 | 62 | $process_status, |
63 | - function ($var) use ($needle) { |
|
63 | + function($var) use ($needle) { |
|
64 | 64 | return strpos($var, $needle); |
65 | 65 | } |
66 | 66 | ); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'user' => request()->user(), |
69 | 69 | 'requestUrl' => request()->url() |
70 | 70 | ]; |
71 | - $message = '419 CSRF Token Mismatch. ' . collect($logData)->toJson(); |
|
71 | + $message = '419 CSRF Token Mismatch. '.collect($logData)->toJson(); |
|
72 | 72 | Log::debug($message); |
73 | 73 | } |
74 | 74 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | return $exception->render($request); |
110 | 110 | } |
111 | 111 | if ($exception instanceof TokenMismatchException) { |
112 | - $newMessage = $exception->getMessage() . ' ' . Lang::get('errors.refresh_page'); |
|
112 | + $newMessage = $exception->getMessage().' '.Lang::get('errors.refresh_page'); |
|
113 | 113 | $modifiedException = new TokenMismatchException($newMessage, $exception->getCode(), $exception); |
114 | 114 | return parent::render($request, $modifiedException); |
115 | 115 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | // Ensure the user can make answers, question exists, and user is the owner of the question it answers. |
21 | 21 | if ($this->user()->can('create', RatingGuideAnswer::class)) { |
22 | - $questionId = (int) $this->input('rating_guide_question_id'); |
|
22 | + $questionId = (int)$this->input('rating_guide_question_id'); |
|
23 | 23 | if ($questionId) { |
24 | 24 | $question = RatingGuideQuestion::find($questionId); |
25 | 25 | return $question && $this->user()->can('update', $question); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | public function rules() : array |
26 | 26 | { |
27 | 27 | return [ |
28 | - 'name' => 'required|unique_translation:skills,name' . (isset($this->id) ? ",{$this->id}" : ''), |
|
28 | + 'name' => 'required|unique_translation:skills,name'.(isset($this->id) ? ",{$this->id}" : ''), |
|
29 | 29 | 'description' => 'required', |
30 | 30 | 'skill_type_id' => 'exists:skill_types,id' |
31 | 31 | ]; |
@@ -33,7 +33,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | ); |
@@ -29,7 +29,7 @@ discard block |
||
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 |
||
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 |