Apply Laravel coding style

Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions.

You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root.

For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
This commit is contained in:
Shift
2023-01-07 20:55:49 +00:00
parent 49021a4497
commit 0b263803ad
232 changed files with 14443 additions and 14827 deletions

View File

@@ -59,8 +59,7 @@ class MailController extends Controller
/**
* separate reply.
*
* @param type $body
*
* @param type $body
* @return type string
*/
public function separate_reply($body)
@@ -72,14 +71,13 @@ 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();
}
@@ -89,14 +87,13 @@ 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();
}
@@ -106,15 +103,14 @@ 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();
}
@@ -124,8 +120,7 @@ class MailController extends Controller
/**
* get sla.
*
* @param object $email
*
* @param object $email
* @return int
*/
public function sla($email)
@@ -135,7 +130,7 @@ class MailController extends Controller
if ($help) {
$sla = $help->sla_plan;
}
if (!$sla) {
if (! $sla) {
$sla = $this->ticketController()->getSystemDefaultSla();
}
@@ -191,17 +186,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);
}
@@ -347,8 +342,7 @@ class MailController extends Controller
/**
* function to load data.
*
* @param type $id
*
* @param type $id
* @return type file
*/
public function get_data($id)
@@ -372,8 +366,7 @@ class MailController extends Controller
/**
* separate reply.
*
* @param type $body
*
* @param type $body
* @return type string
*/
public function separateReply($body)