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-06 11:53:02 +00:00
parent af15afd97d
commit 21910f2106
235 changed files with 14381 additions and 14773 deletions

View File

@@ -58,8 +58,7 @@ class MailController extends Controller
/**
* separate reply.
*
* @param type $body
*
* @param type $body
* @return type string
*/
public function separate_reply($body)
@@ -71,14 +70,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();
}
@@ -88,14 +86,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();
}
@@ -105,15 +102,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();
}
@@ -123,8 +119,7 @@ class MailController extends Controller
/**
* get sla.
*
* @param object $email
*
* @param object $email
* @return int
*/
public function sla($email)
@@ -134,7 +129,7 @@ class MailController extends Controller
if ($help) {
$sla = $help->sla_plan;
}
if (!$sla) {
if (! $sla) {
$sla = $this->ticketController()->getSystemDefaultSla();
}
@@ -190,17 +185,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);
}
@@ -346,8 +341,7 @@ class MailController extends Controller
/**
* function to load data.
*
* @param type $id
*
* @param type $id
* @return type file
*/
public function get_data($id)
@@ -371,8 +365,7 @@ class MailController extends Controller
/**
* separate reply.
*
* @param type $body
*
* @param type $body
* @return type string
*/
public function separateReply($body)