Skip to content

Commit 1aff35f

Browse files
authored
Merge pull request #8281 from ladybirdweb/analysis-16Gygv
Apply fixes from StyleCI
2 parents d8376b2 + 001094b commit 1aff35f

36 files changed

Lines changed: 114 additions & 8 deletions

app/Api/v1/ApiController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@ public function checkUrl()
743743

744744
$url = $url.'/api/v1/helpdesk/check-url?api_key='.$this->request->input('api_key').'&token='.\Config::get('app.token');
745745
$result = $this->CallGetApi($url);
746+
746747
//dd($result);
747748
return response()->json(compact('result'));
748749
} catch (\Exception $ex) {

app/Api/v1/ApiExceptAuthController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public function checkUrl()
4242
$url = $url.'api/v1/helpdesk/check-url';
4343
//return $url;
4444
$result = $this->CallGetApi($url);
45+
4546
// dd($result);
4647
return response()->json(compact('result'));
4748
} catch (\Exception $ex) {

app/Api/v1/TokenAuthController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public function authenticate(Request $request)
6464
}
6565

6666
$user_id = \Auth::user();
67+
6768
// if no errors are encountered we can return a JWT
6869
return response()->json(compact('token', 'user_id'));
6970
}
@@ -91,6 +92,7 @@ public function getAuthenticatedUser()
9192

9293
return response()->json(compact('error'));
9394
}
95+
9496
//dd($user);
9597
return response()->json(compact('user'));
9698
}
@@ -174,8 +176,8 @@ public function forgotPassword(Request $request)
174176
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->first();
175177
if (isset($password_reset_table)) {
176178
$password_reset_table = \DB::table('password_resets')->where('email', '=', $user->email)->update(['token' => $code, 'created_at' => $date]);
177-
// $password_reset_table->token = $code;
178-
// $password_reset_table->update(['token' => $code]);
179+
// $password_reset_table->token = $code;
180+
// $password_reset_table->update(['token' => $code]);
179181
} else {
180182
$create_password_reset = \DB::table('password_resets')->insert(['email' => $user->email, 'token' => $code, 'created_at' => $date]);
181183
}

app/Http/Controllers/Admin/helpdesk/AgentController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ public function update($id, User $user, AgentUpdate $request, Assign_team_agent
235235
foreach ($requests as $req) {
236236
DB::insert('insert into team_assign_agent (team_id, agent_id) values (?,?)', [$req, $id]);
237237
}
238+
238239
//Todo For success and failure conditions
239240
try {
240241
if ($request->input('country_code') != '' or $request->input('country_code') != null) {
@@ -304,6 +305,7 @@ public function generateRandomString($length = 10)
304305
for ($i = 0; $i < $length; $i++) {
305306
$randomString .= $characters[rand(0, $charactersLength - 1)];
306307
}
308+
307309
// return random string
308310
return $randomString;
309311
}

app/Http/Controllers/Admin/helpdesk/BanlistController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public function store(BanRequest $request, User $user)
8787
$use->ban = $request->input('ban');
8888
$use->internal_note = $request->input('internal_note');
8989
$use->save();
90+
9091
// $user->create($request->input())->save();
9192
return redirect('banlist')->with('success', Lang::get('lang.email_banned_sucessfully'));
9293
} else {

app/Http/Controllers/Admin/helpdesk/EmailsController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ public function validatingEmailSettingsUpdate($id, MailRequest $request)
380380
}
381381
//dd($ex->getMessage());
382382
loging('mail-config', $message);
383+
383384
//Log::error($ex->getMessage());
384385
return $this->jsonResponse('fails', $message);
385386
}

app/Http/Controllers/Admin/helpdesk/FormController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ public function edit($id)
196196
//dd($form);
197197
if ($form) {
198198
$fields = $form->fields();
199+
199200
//dd($fields);
200201
return view('themes.default1.admin.helpdesk.manage.form.edit', compact('form', 'fields', 'select_forms'));
201202
}
@@ -215,6 +216,7 @@ public function addChildForm($id)
215216
//dd($form);
216217
if ($form) {
217218
$fields = $form->fields();
219+
218220
//dd($fields);
219221
return view('themes.default1.admin.helpdesk.manage.form.add-child', compact('form', 'fields', 'select_forms'));
220222
}

app/Http/Controllers/Admin/helpdesk/GroupController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,11 @@ public function update($id, Groups $group, GroupUpdateRequest $request)
168168
//Updating admin_notes field
169169
$adminNotes = $request->input('admin_notes');
170170
$var->admin_notes = $adminNotes;
171+
171172
/* Check whether function success or not */
172173
try {
173174
$var->save();
175+
174176
/* redirect to Index page with Success Message */
175177
return redirect('groups')->with('success', Lang::get('lang.group_updated_successfully'));
176178
} catch (Exception $e) {
@@ -198,9 +200,11 @@ public function destroy($id, Groups $group, Group_assign_department $group_assig
198200
}
199201
$group_assign_department->where('group_id', $id)->delete();
200202
$groups = $group->whereId($id)->first();
203+
201204
/* Check whether function success or not */
202205
try {
203206
$groups->delete();
207+
204208
/* redirect to Index page with Success Message */
205209
return redirect('groups')->with('success', Lang::get('lang.group_deleted_successfully'));
206210
} catch (Exception $e) {

app/Http/Controllers/Admin/helpdesk/HelptopicController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public function store(Help_topic $topic, HelptopicRequest $request)
118118
}
119119
/* Check whether function success or not */
120120
$topic->fill($request->except('custom_form', 'auto_assign'))->save();
121+
121122
// $topics->fill($request->except('custom_form','auto_assign'))->save();
122123
/* redirect to Index page with Success Message */
123124
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_created_successfully'));
@@ -192,6 +193,7 @@ public function update($id, Help_topic $topic, HelptopicUpdate $request)
192193
->where('id', '=', 1)
193194
->update(['help_topic' => $id]);
194195
}
196+
195197
/* redirect to Index page with Success Message */
196198
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_updated_successfully'));
197199
} catch (Exception $e) {
@@ -238,9 +240,11 @@ public function destroy($id, Help_topic $topic, Ticket $ticket_setting)
238240
}
239241
$message = $ticket.$email;
240242
$topics = $topic->whereId($id)->first();
243+
241244
/* Check whether function success or not */
242245
try {
243246
$topics->delete();
247+
244248
/* redirect to Index page with Success Message */
245249
return redirect('helptopic')->with('success', Lang::get('lang.helptopic_deleted_successfully').$message);
246250
} catch (Exception $e) {

app/Http/Controllers/Admin/helpdesk/SettingsController.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public function getcompany(Company $company)
7474
try {
7575
/* fetch the values of company from company table */
7676
$companys = $company->whereId('1')->first();
77+
7778
/* Direct to Company Settings Page */
7879
return view('themes.default1.admin.helpdesk.settings.company', compact('companys'));
7980
} catch (Exception $e) {
@@ -104,9 +105,11 @@ public function postcompany($id, Company $company, CompanyRequest $request)
104105
if ($request->input('use_logo') == null) {
105106
$companys->use_logo = '0';
106107
}
108+
107109
/* Check whether function success or not */
108110
try {
109111
$companys->fill($request->except('logo'))->save();
112+
110113
/* redirect to Index page with Success Message */
111114
return redirect('getcompany')->with('success', Lang::get('lang.company_updated_successfully'));
112115
} catch (Exception $e) {
@@ -167,6 +170,7 @@ public function getsystem(System $system, Department $department, Timezones $tim
167170
$email_mandatory = $common_settings->select('status')
168171
->where('option_name', '=', 'email_mandatory')
169172
->first();
173+
170174
/* Direct to System Settings Page */
171175
return view('themes.default1.admin.helpdesk.settings.system', compact('systems', 'departments', 'timezones', 'time', 'date', 'date_time', 'common_setting', 'send_otp', 'email_mandatory'));
172176
} catch (Exception $e) {
@@ -215,6 +219,7 @@ public function postsystem($id, System $system, SystemRequest $request)
215219
$sett->status = $itil;
216220
$sett->save();
217221
}
222+
218223
/* redirect to Index page with Success Message */
219224
return redirect('getsystem')->with('success', Lang::get('lang.system_updated_successfully'));
220225
} catch (Exception $e) {
@@ -242,6 +247,7 @@ public function getticket(Ticket $ticket, Sla_plan $sla, Help_topic $topic, Tick
242247
$slas = $sla->get();
243248
/* Fetch the values from Help_topic table */
244249
$topics = $topic->get();
250+
245251
/* Direct to Ticket Settings Page */
246252
return view('themes.default1.admin.helpdesk.settings.ticket', compact('tickets', 'slas', 'topics', 'priority'));
247253
} catch (Exception $e) {
@@ -276,6 +282,7 @@ public function postticket($id, Ticket $ticket, Request $request)
276282
$tickets->collision_avoid = $request->input('collision_avoid');
277283
/* Check whether function success or not */
278284
$tickets->save();
285+
279286
/* redirect to Index page with Success Message */
280287
return redirect('getticket')->with('success', Lang::get('lang.ticket_updated_successfully'));
281288
} catch (Exception $e) {
@@ -302,6 +309,7 @@ public function getemail(Email $email, Template $template, Emails $email1)
302309
$templates = $template->get();
303310
/* Fetch the values from Emails table */
304311
$emails1 = $email1->get();
312+
305313
/* Direct to Email Settings Page */
306314
return view('themes.default1.admin.helpdesk.settings.email', compact('emails', 'templates', 'emails1'));
307315
} catch (Exception $e) {
@@ -334,6 +342,7 @@ public function postemail($id, Email $email, EmailRequest $request)
334342
$emails->attachment = $request->input('attachment');
335343
/* Check whether function success or not */
336344
$emails->save();
345+
337346
/* redirect to Index page with Success Message */
338347
return redirect('getemail')->with('success', Lang::get('lang.email_updated_successfully'));
339348
} catch (Exception $e) {
@@ -435,6 +444,7 @@ public function postSchedular(Email $email, Template $template, Emails $email1,
435444
}
436445
$work->save();
437446
$this->saveConditions();
447+
438448
/* redirect to Index page with Success Message */
439449
return redirect('job-scheduler')->with('success', Lang::get('lang.job-scheduler-success'));
440450
} catch (Exception $e) {
@@ -455,6 +465,7 @@ public function getresponder(Responder $responder)
455465
try {
456466
/* fetch the values of responder from responder table */
457467
$responders = $responder->whereId('1')->first();
468+
458469
/* Direct to Responder Settings Page */
459470
return view('themes.default1.admin.helpdesk.settings.responder', compact('responders'));
460471
} catch (Exception $e) {
@@ -484,6 +495,7 @@ public function postresponder(Responder $responder, Request $request)
484495
/* fill the values to coompany table */
485496
/* Check whether function success or not */
486497
$responders->save();
498+
487499
/* redirect to Index page with Success Message */
488500
return redirect('getresponder')->with('success', Lang::get('lang.auto_response_updated_successfully'));
489501
} catch (Exception $e) {
@@ -504,6 +516,7 @@ public function getalert(Alert $alert)
504516
try {
505517
/* fetch the values of alert from alert table */
506518
$alerts = $alert->whereId('1')->first();
519+
507520
/* Direct to Alert Settings Page */
508521
return view('themes.default1.admin.helpdesk.settings.alert', compact('alerts'));
509522
} catch (Exception $e) {
@@ -572,6 +585,7 @@ public function postalert($id, Alert $alert, Request $request)
572585
/* fill the values to coompany table */
573586
/* Check whether function success or not */
574587
$alerts->save();
588+
575589
/* redirect to Index page with Success Message */
576590
return redirect('getalert')->with('success', Lang::get('lang.alert_&_notices_updated_successfully'));
577591
} catch (Exception $e) {
@@ -615,6 +629,7 @@ public function getStatuses()
615629
try {
616630
/* fetch the values of company from company table */
617631
$statuss = \DB::table('ticket_status')->get();
632+
618633
/* Direct to Company Settings Page */
619634
return view('themes.default1.admin.helpdesk.settings.status', compact('statuss'));
620635
} catch (Exception $e) {
@@ -635,6 +650,7 @@ public function getEditStatuses($id)
635650
try {
636651
/* fetch the values of company from company table */
637652
$status = \DB::table('ticket_status')->where('id', '=', $id)->first();
653+
638654
/* Direct to Company Settings Page */
639655
return view('themes.default1.admin.helpdesk.settings.status-edit', compact('status'));
640656
} catch (Exception $e) {
@@ -667,6 +683,7 @@ public function editStatuses($id, StatusRequest $request)
667683
}
668684
$statuss->sort = $request->input('sort');
669685
$statuss->save();
686+
670687
/* Direct to Company Settings Page */
671688
return redirect()->back()->with('success', Lang::get('lang.status_has_been_updated_successfully'));
672689
} catch (Exception $e) {
@@ -698,6 +715,7 @@ public function createStatuses(\App\Model\helpdesk\Ticket\Ticket_Status $statuss
698715
}
699716
$statuss->sort = $request->input('sort');
700717
$statuss->save();
718+
701719
/* Direct to Company Settings Page */
702720
return redirect()->back()->with('success', Lang::get('lang.status_has_been_created_successfully'));
703721
} catch (Exception $ex) {
@@ -718,6 +736,7 @@ public function deleteStatuses($id)
718736
if ($id > 5) {
719737
/* fetch the values of company from company table */
720738
\App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete();
739+
721740
/* Direct to Company Settings Page */
722741
return redirect()->back()->with('success', Lang::get('lang.status_has_been_deleted'));
723742
} else {

0 commit comments

Comments
 (0)