Apply fixes from StyleCI

This commit is contained in:
StyleCI Bot
2023-01-07 19:48:16 +00:00
parent 774eed8b0e
commit 5055b443fc
235 changed files with 14833 additions and 14446 deletions

View File

@@ -59,7 +59,8 @@ class MailController extends Controller
/**
* separate reply.
*
* @param type $body
* @param type $body
*
* @return type string
*/
public function separate_reply($body)
@@ -71,13 +72,14 @@ class MailController extends Controller
}
/**
* @param object $email
* @param object $email
*
* @return int
*/
public function priority($email)
{
$priority = $email->priority;
if (! $priority) {
if (!$priority) {
$priority = $this->ticketController()->getSystemDefaultPriority();
}
@@ -87,13 +89,14 @@ class MailController extends Controller
/**
* get department.
*
* @param object $email
* @param object $email
*
* @return int
*/
public function department($email)
{
$department = $email->department;
if (! $department) {
if (!$department) {
$department = $this->ticketController()->getSystemDefaultDepartment();
}
@@ -103,14 +106,15 @@ class MailController extends Controller
/**
* get help topic.
*
* @param object $email
* @param object $email
*
* @return int
*/
public function helptopic($email)
{
//dd($email);
$helptopic = $email->help_topic;
if (! $helptopic) {
if (!$helptopic) {
$helptopic = $this->ticketController()->getSystemDefaultHelpTopic();
}
@@ -120,7 +124,8 @@ class MailController extends Controller
/**
* get sla.
*
* @param object $email
* @param object $email
*
* @return int
*/
public function sla($email)
@@ -130,7 +135,7 @@ class MailController extends Controller
if ($help) {
$sla = $help->sla_plan;
}
if (! $sla) {
if (!$sla) {
$sla = $this->ticketController()->getSystemDefaultSla();
}
@@ -186,17 +191,17 @@ class MailController extends Controller
public function getMessageContent($message, $email)
{
$body = $message->getMessageBody(true);
if (! $body) {
if (!$body) {
$body = $message->getMessageBody();
}
$body = $this->separateReply($body);
$subject = $message->getSubject();
$address = $message->getAddresses('reply-to');
if (! $address) {
if (!$address) {
$address = $message->getAddresses('from');
}
$collaborators = $this->collaburators($message, $email);
$attachments = (! $message->getAttachments()) ? [] : $message->getAttachments();
$attachments = (!$message->getAttachments()) ? [] : $message->getAttachments();
//dd(['body' => $body, 'subject' => $subject, 'address' => $address, 'cc' => $collaborator, 'attachments' => $attachments]);
$this->workflow($address, $subject, $body, $collaborators, $attachments, $email);
}
@@ -342,7 +347,8 @@ class MailController extends Controller
/**
* function to load data.
*
* @param type $id
* @param type $id
*
* @return type file
*/
public function get_data($id)
@@ -366,7 +372,8 @@ class MailController extends Controller
/**
* separate reply.
*
* @param type $body
* @param type $body
*
* @return type string
*/
public function separateReply($body)