Skip to content

Commit 1ab5e12

Browse files
xaviqvStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 9661150 commit 1ab5e12

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3218
-3194
lines changed

src/Controllers/CommentsController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
class CommentsController extends Controller
1919
{
20-
use Attachments, Purifiable;
20+
use Attachments;
21+
use Purifiable;
2122

2223
protected $member;
2324

src/Controllers/ConfigurationsController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function index()
2525
$table_section = ['subject_content_column', 'list_text_max_length', 'check_last_update_seconds', 'length_menu', 'max_agent_buttons', 'calendar_month_filter', 'paginate_items'];
2626
$features_section = ['departments_feature', 'departments_notices_feature', 'ticket_attachments_feature'];
2727
$email_section = ['status_notification', 'comment_notification', 'queue_emails', 'assigned_notification',
28-
'list_owner_notification', 'status_owner_notification', 'email.template', 'email.owner.newticket.template', 'email.account.name', 'email.account.mailbox', 'custom_recipients', ];
28+
'list_owner_notification', 'status_owner_notification', 'email.template', 'email.owner.newticket.template', 'email.account.name', 'email.account.mailbox', 'custom_recipients', ];
2929
$tickets_section = ['default_priority_id', 'default_status_id', 'default_close_status_id', 'default_reopen_status_id',
3030
'attachments_ticket_max_size', 'attachments_ticket_max_files_num', 'attachments_mimes',
3131
'attachments_path', 'thumbnails_path', 'oldest_year', 'html_replacements', 'use_default_status_id', 'delete_modal_type', ];
@@ -107,6 +107,7 @@ public function store(Request $request)
107107

108108
Session::flash('status', 'Setting saved successfully.');
109109
\Cache::forget('panichd::settings'); // refresh cached settings
110+
110111
return redirect()->action('\PanicHD\PanicHD\Controllers\ConfigurationsController@index');
111112
}
112113

src/Controllers/DashboardController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ public function index($indicator_period = 2)
6868
$active_tab = 'cat';
6969
}
7070

71-
return view('panichd::admin.index',
71+
return view(
72+
'panichd::admin.index',
7273
compact(
7374
'tickets_count',
7475
'a_tickets_count',
@@ -79,6 +80,7 @@ public function index($indicator_period = 2)
7980
'categories_share',
8081
'agents_share',
8182
'active_tab'
82-
));
83+
)
84+
);
8385
}
8486
}

src/Controllers/FiltersController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
class FiltersController extends Controller
1212
{
13-
use CacheVars, TicketFilters;
13+
use CacheVars;
14+
use TicketFilters;
1415

1516
// $a_filters is in TicketFilters trait
1617

src/Controllers/NotificationsController.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ public function newComment(Comment $comment, $request)
204204
if (!is_null($recipient)) {
205205
// Register the notified email
206206
$notification = CommentNotification::create([
207-
'comment_id' => $comment->id,
208-
'name' => $recipient->name,
209-
'email' => $recipient->email,
210-
'member_id' => $member_id,
207+
'comment_id' => $comment->id,
208+
'name' => $recipient->name,
209+
'email' => $recipient->email,
210+
'member_id' => $member_id,
211211
]);
212212

213213
// Add email to actual mail recipients
@@ -296,29 +296,29 @@ public function notificationResend(Request $request)
296296
if (is_null($notification)) {
297297
// Register the notified email
298298
$notification = CommentNotification::create([
299-
'comment_id' => $comment->id,
300-
'name' => $recipient->name,
301-
'email' => $recipient->email,
302-
'member_id' => $recipient->id,
299+
'comment_id' => $comment->id,
300+
'name' => $recipient->name,
301+
'email' => $recipient->email,
302+
'member_id' => $recipient->id,
303303
]);
304304

305305
if ($comment->notifications->count() == 0) {
306306
// No previous registered notifications
307307
if ($ticket->agent->id == $comment->owner->id) {
308308
// Message from agent to owner, so we register the non registered past owner notification
309309
$notification = CommentNotification::create([
310-
'comment_id' => $comment->id,
311-
'name' => $ticket->owner->name,
312-
'email' => $ticket->owner->email,
313-
'member_id' => $ticket->owner->id,
310+
'comment_id' => $comment->id,
311+
'name' => $ticket->owner->name,
312+
'email' => $ticket->owner->email,
313+
'member_id' => $ticket->owner->id,
314314
]);
315315
} elseif ($ticket->owner->id == $comment->owner->id) {
316316
// Message from owner to agent, so we register the non registered past agent notification
317317
$notification = CommentNotification::create([
318-
'comment_id' => $comment->id,
319-
'name' => $ticket->agent->name,
320-
'email' => $ticket->agent->email,
321-
'member_id' => $ticket->agent->id,
318+
'comment_id' => $comment->id,
319+
'name' => $ticket->agent->name,
320+
'email' => $ticket->agent->email,
321+
'member_id' => $ticket->agent->id,
322322
]);
323323
}
324324
}

src/Controllers/TicketsController.php

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727

2828
class TicketsController extends Controller
2929
{
30-
use Attachments, CacheVars, Purifiable, TicketFilters;
30+
use Attachments;
31+
use CacheVars;
32+
use Purifiable;
33+
use TicketFilters;
3134

3235
protected $tickets;
3336
protected $member;
@@ -102,12 +105,12 @@ public function getTicketCollectionFrom($ticketList)
102105
}
103106
} elseif (in_array($field, $this->a_search_fields_text)) {
104107
if ($field == 'content') {
105-
$collection->where(function ($query) use ($search_fields, $value) {
108+
$collection->where(function ($query) use ($value) {
106109
$query->where('content', 'like', '%'.$value.'%')
107110
->orWhere('html', 'like', '%'.$value.'%');
108111
});
109112
} elseif ($field == 'intervention') {
110-
$collection->where(function ($query) use ($search_fields, $value) {
113+
$collection->where(function ($query) use ($value) {
111114
$query->where('intervention', 'like', '%'.$value.'%')
112115
->orWhere('intervention_html', 'like', '%'.$value.'%');
113116
});
@@ -405,10 +408,10 @@ public function renderTicketTable($collection, $ticketList)
405408

406409
$collection->editColumn('subject', function ($ticket) {
407410
$field = (string) link_to_route(
408-
Setting::grab('main_route').'.show',
409-
$ticket->subject,
410-
$ticket->id
411-
);
411+
Setting::grab('main_route').'.show',
412+
$ticket->subject,
413+
$ticket->id
414+
);
412415

413416
if ($this->member->id == $ticket->agent_id and $ticket->read_by_agent != '1') {
414417
$field = '<span class="unread_ticket_text">'.$field.'</span>';
@@ -1142,7 +1145,7 @@ public function register_search_fields(Request $request)
11421145
'fields' => $a_error_fields,
11431146
'search_fields' => $search_fields ?? [],
11441147
'search_URL' => $search_URL ?? '',
1145-
]);
1148+
]);
11461149
}
11471150

11481151
/**
@@ -1821,7 +1824,7 @@ public function show($id)
18211824
// Category tags
18221825
$tag_lists = Category::whereHas('tags')
18231826
->with([
1824-
'tags'=> function ($q1) use ($id) {
1827+
'tags'=> function ($q1) {
18251828
$q1->select('id', 'name');
18261829
},
18271830
])
@@ -1888,8 +1891,21 @@ public function show($id)
18881891
$ticket->timestamps = true;
18891892
}
18901893

1891-
$data = compact('ticket', 'a_reasons', 'a_tags_selected', 'status_lists', 'complete_status_list', 'agent_lists', 'tag_lists',
1892-
'comments', 'a_notifications', 'c_members', 'a_resend_notifications', 'close_perm', 'reopen_perm');
1894+
$data = compact(
1895+
'ticket',
1896+
'a_reasons',
1897+
'a_tags_selected',
1898+
'status_lists',
1899+
'complete_status_list',
1900+
'agent_lists',
1901+
'tag_lists',
1902+
'comments',
1903+
'a_notifications',
1904+
'c_members',
1905+
'a_resend_notifications',
1906+
'close_perm',
1907+
'reopen_perm'
1908+
);
18931909
$data['menu'] = 'show';
18941910

18951911
return view('panichd::tickets.show', $data);

src/Events/CommentCreated.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
class CommentCreated
1313
{
14-
use InteractsWithSockets, SerializesModels;
14+
use InteractsWithSockets;
15+
use SerializesModels;
1516
public $comment;
1617

1718
/**

src/Events/CommentUpdated.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
class CommentUpdated
1212
{
13-
use InteractsWithSockets, SerializesModels;
13+
use InteractsWithSockets;
14+
use SerializesModels;
1415
public $original;
1516
public $modified;
1617

src/Events/TicketCreated.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
class TicketCreated
1212
{
13-
use InteractsWithSockets, SerializesModels;
13+
use InteractsWithSockets;
14+
use SerializesModels;
1415
public $ticket;
1516

1617
/**

src/Events/TicketUpdated.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
class TicketUpdated
1212
{
13-
use InteractsWithSockets, SerializesModels;
13+
use InteractsWithSockets;
14+
use SerializesModels;
1415
public $original;
1516
public $modified;
1617

0 commit comments

Comments
 (0)