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-03 08:25:25 +00:00
parent b535aa90eb
commit 43386fd86d
357 changed files with 15021 additions and 15193 deletions

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Agents extends BaseModel
{
protected $table = 'agents';
protected $fillable = [
'user_name', 'first_name', 'last_name', 'email', 'phone', 'mobile', 'agent_sign',
'account_type', 'account_status', 'assign_group', 'primary_dpt', 'agent_tzone',

View File

@@ -7,5 +7,6 @@ use App\BaseModel;
class Assign_team_agent extends BaseModel
{
protected $table = 'team_assign_agent';
protected $fillable = ['id', 'team_id', 'agent_id', 'updated_at', 'created_at'];
}

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Department extends BaseModel
{
protected $table = 'department';
protected $fillable = [
'name', 'type', 'sla', 'manager', 'ticket_assignment', 'outgoing_email',
'template_set', 'auto_ticket_response', 'auto_message_response',

View File

@@ -7,5 +7,6 @@ use App\BaseModel;
class Group_assign_department extends BaseModel
{
protected $table = 'group_assign_department';
protected $fillable = ['group_id', 'department_id'];
}

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Groups extends BaseModel
{
protected $table = 'groups';
protected $fillable = [
'name', 'group_status', 'can_create_ticket', 'can_edit_ticket',
'can_post_ticket', 'can_close_ticket', 'can_assign_ticket',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Teams extends BaseModel
{
protected $table = 'teams';
protected $fillable = [
'name', 'status', 'team_lead', 'assign_alert', 'admin_notes',
];

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Banlist extends BaseModel
{
protected $table = 'banlist';
protected $fillable = [
'id', 'ban_status', 'email_address', 'internal_notes',
];

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Emails extends BaseModel
{
protected $table = 'emails';
protected $fillable = [
'email_address', 'email_name', 'department', 'priority', 'help_topic',
'user_name', 'password', 'fetching_host', 'fetching_port', 'fetching_protocol', 'fetching_encryption', 'mailbox_protocol',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Template extends BaseModel
{
protected $table = 'template';
protected $fillable = [
'id', 'name', 'status', 'template_set_to_clone', 'language', 'internal_note',
];

View File

@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model;
class Filter extends Model
{
protected $table = 'filters';
protected $fillable = ['ticket_id', 'key', 'value'];
public function getLabelTitle($ticketid)
@@ -18,7 +19,7 @@ class Filter extends Model
$labels = new Label();
$label = $labels->whereIn('title', $labelids)->get();
if ($label->count() > 0) {
foreach ($label as $key=>$l) {
foreach ($label as $key => $l) {
$output[$key] = $l->titleWithColor();
}
}

View File

@@ -8,6 +8,7 @@ use Lang;
class Label extends Model
{
protected $table = 'labels';
protected $fillable = ['title', 'color', 'order', 'status'];
public function titleWithColor()

View File

@@ -7,5 +7,6 @@ use Illuminate\Database\Eloquent\Model;
class Tag extends Model
{
protected $table = 'tags';
protected $fillable = ['name', 'description'];
}

View File

@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model;
class FieldValue extends Model
{
protected $table = 'field_values';
protected $fillable = ['field_id', 'child_id', 'field_key', 'field_value'];
public function childId()

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class Form_details extends BaseModel
{
public $timestamps = false;
protected $table = 'form_details';
protected $fillable = ['id', 'label', 'type'];
}

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class Form_name extends BaseModel
{
public $timestamps = false;
protected $table = 'form_name';
protected $fillable = ['id', 'name', 'status', 'no_of_fields'];
}

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class Form_value extends BaseModel
{
public $timestamps = false;
protected $table = 'form_value';
protected $fillable = ['id', 'values'];
}

View File

@@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\Model;
class Guest_note extends Model
{
public $timestamps = false;
protected $table = 'guest_note';
protected $fillable = ['id', 'heading', 'content'];
}

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Forms extends BaseModel
{
protected $table = 'forms';
/*
this is a custom Forms created by user himself
*/

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Help_topic extends BaseModel
{
protected $table = 'help_topic';
protected $fillable = [
'id', 'topic', 'parent_topic', 'custom_form', 'department', 'ticket_status', 'priority',
'sla_plan', 'thank_page', 'ticket_num_format', 'internal_notes', 'status', 'type', 'auto_assign',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Sla_plan extends BaseModel
{
protected $table = 'sla_plan';
protected $fillable = [
'name', 'grace_period', 'admin_note', 'status', 'transient', 'ticket_overdue',
];

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Notification extends BaseModel
{
protected $table = 'notifications';
protected $fillable = [
'model_id', 'userid_created', 'type_id',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class NotificationType extends BaseModel
{
protected $table = 'notification_types';
protected $fillable = [
'message', 'type', 'icon_class',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class UserNotification extends BaseModel
{
protected $table = 'user_notification';
protected $fillable = [
'notification_id', 'user_id', 'is_read',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Notification extends BaseModel
{
protected $table = 'notifications';
protected $fillable = [
'model_id', 'userid_created', 'type_id',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class NotificationType extends BaseModel
{
protected $table = 'notification_types';
protected $fillable = [
'message', 'type', 'icon_class',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class UserNotification extends BaseModel
{
protected $table = 'user_notification';
protected $fillable = [
'notification_id', 'user_id', 'is_read',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Rating extends BaseModel
{
protected $table = 'ratings';
protected $fillable = [
'name', 'display_order', 'allow_modification', 'rating_scale', 'rating_area', 'restrict',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class RatingRef extends BaseModel
{
protected $table = 'rating_ref';
protected $fillable = [
'rating_id', 'ticket_id', 'thread_id', 'rating_value',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Access extends BaseModel
{
protected $table = 'access';
protected $fillable = [
'password_expire', 'reg_method', 'user_session',
'agent_session', 'reset_ticket_expire', 'password_reset',

View File

@@ -9,6 +9,7 @@ class Alert extends BaseModel
/* Using alert_notice table */
protected $table = 'settings_alert_notice';
/* Set fillable fields in table */
protected $fillable = [

View File

@@ -9,6 +9,7 @@ class Approval extends BaseModel
/* Using Ticket table */
protected $table = 'approval';
/* Set fillable fields in table */
protected $fillable = [
'id', 'name', 'status', 'created_at', 'updated_at',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class CommonSettings extends BaseModel
{
protected $table = 'common_settings';
protected $fillable = [
'status', 'option_name', 'option_value', 'optional_field', 'created_at', 'updated_at',
];

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Company extends BaseModel
{
protected $table = 'settings_company';
protected $fillable = [
'company_name', 'website', 'phone', 'address', 'landing_page', 'offline_page',
'thank_page', 'logo', 'use_logo',

View File

@@ -9,6 +9,7 @@ class Email extends BaseModel
/* Using Email table */
protected $table = 'settings_email';
/* Set fillable fields in table */
protected $fillable = [
'id', 'template', 'sys_email', 'alert_email', 'admin_email', 'mta', 'email_fetching', 'strip',

View File

@@ -9,6 +9,7 @@ class Followup extends BaseModel
/* Using auto_response table */
protected $table = 'followup';
/* Set fillable fields in table */
protected $fillable = [

View File

@@ -7,5 +7,6 @@ use App\BaseModel;
class Plugin extends BaseModel
{
protected $table = 'plugins';
protected $fillable = ['name', 'path', 'status'];
}

View File

@@ -9,6 +9,7 @@ class Responder extends BaseModel
/* Using auto_response table */
protected $table = 'settings_auto_response';
/* Set fillable fields in table */
protected $fillable = [

View File

@@ -9,6 +9,7 @@ class Security extends BaseModel
/* Using auto_response table */
protected $table = 'settings_security';
/* Set fillable fields in table */
protected $fillable = [

View File

@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model;
class SocialMedia extends Model
{
protected $table = 'social_media';
protected $fillable = [
'provider',
'key',

View File

@@ -9,6 +9,7 @@ class System extends BaseModel
/* Using System Table */
protected $table = 'settings_system';
protected $fillable = [
'id', 'status', 'url', 'name', 'department', 'page_size', 'log_level', 'purge_log', 'name_format',

View File

@@ -9,6 +9,7 @@ class Ticket extends BaseModel
/* Using Ticket table */
protected $table = 'settings_ticket';
/* Set fillable fields in table */
protected $fillable = [
'id', 'num_format', 'num_sequence', 'priority', 'sla', 'help_topic', 'max_open_ticket', 'collision_avoid', 'lock_ticket_frequency',

View File

@@ -7,5 +7,6 @@ use Illuminate\Database\Eloquent\Model;
class Footer extends Model
{
protected $table = 'footer';
protected $fillable = ['title', 'footer'];
}

View File

@@ -7,5 +7,6 @@ use Illuminate\Database\Eloquent\Model;
class Footer2 extends Model
{
protected $table = 'footer2';
protected $fillable = ['title', 'footer'];
}

View File

@@ -7,5 +7,6 @@ use Illuminate\Database\Eloquent\Model;
class Footer3 extends Model
{
protected $table = 'footer3';
protected $fillable = ['title', 'footer'];
}

View File

@@ -7,5 +7,6 @@ use Illuminate\Database\Eloquent\Model;
class Footer4 extends Model
{
protected $table = 'footer4';
protected $fillable = ['title', 'footer'];
}

View File

@@ -7,5 +7,6 @@ use App\BaseModel;
class Widgets extends BaseModel
{
protected $table = 'widgets';
protected $fillable = ['name', 'value', 'created_at', 'updated_at'];
}

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class TicketToken extends BaseModel
{
protected $table = 'ticket_token';
protected $fillable = [
'id', 'ticket_id', 'token', 'created_at', 'updated_at',
];

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Ticket_Collaborator extends BaseModel
{
protected $table = 'ticket_collaborator';
protected $fillable = [
'id', 'isactive', 'ticket_id', 'user_id', 'role', 'updated_at', 'created_at',
];

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Ticket_Form_Data extends BaseModel
{
protected $table = 'ticket_form_data';
protected $fillable = ['id', 'ticket_id', 'title', 'content', 'created_at', 'updated_at'];
public function getFieldKeyLabel()

View File

@@ -7,8 +7,11 @@ use App\BaseModel;
class Ticket_Priority extends BaseModel
{
protected $primaryKey = 'priority_id';
public $timestamps = false;
protected $table = 'ticket_priority';
protected $fillable = [
'priority_id', 'priority', 'status', 'user_priority_status', 'priority_desc', 'priority_color', 'priority_urgency', 'ispublic', 'created_at', 'updated_at',
];

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Ticket_Status extends BaseModel
{
protected $table = 'ticket_status';
protected $fillable = [
'id', 'name', 'state', 'message', 'mode', 'flag', 'sort', 'properties', 'icon_class',
];

View File

@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Model;
class Ticket_Thread extends Model
{
protected $table = 'ticket_thread';
protected $fillable = [
'id', 'ticket_id', 'staff_id', 'user_id', 'thread_type', 'poster', 'source', 'is_internal', 'title', 'body', 'format', 'ip_address', 'created_at', 'updated_at',
];
@@ -45,7 +46,7 @@ class Ticket_Thread extends Model
{
require_once base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier.auto.php');
$path = base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier'.DIRECTORY_SEPARATOR.'DefinitionCache'.DIRECTORY_SEPARATOR.'Serializer');
if (!File::exists($path)) {
if (! File::exists($path)) {
File::makeDirectory($path, $mode = 0777, true, true);
}
$config = \HTMLPurifier_Config::createDefault();

View File

@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Model;
class Ticket_ThreadOld extends Model
{
protected $table = 'ticket_thread';
protected $fillable = [
'id', 'ticket_id', 'staff_id', 'user_id', 'thread_type', 'poster', 'source', 'is_internal', 'title', 'body', 'format', 'ip_address', 'created_at', 'updated_at',
];
@@ -45,7 +46,7 @@ class Ticket_ThreadOld extends Model
{
require_once base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier.auto.php');
$path = base_path('vendor'.DIRECTORY_SEPARATOR.'htmlpurifier'.DIRECTORY_SEPARATOR.'library'.DIRECTORY_SEPARATOR.'HTMLPurifier'.DIRECTORY_SEPARATOR.'DefinitionCache'.DIRECTORY_SEPARATOR.'Serializer');
if (!File::exists($path)) {
if (! File::exists($path)) {
File::makeDirectory($path, $mode = 0777, true, true);
}
$config = \HTMLPurifier_Config::createDefault();

View File

@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model;
class Ticket_attachments extends Model
{
protected $table = 'ticket_attachment';
protected $fillable = [
'id', 'thread_id', 'name', 'size', 'type', 'file', 'data', 'poster', 'updated_at', 'created_at',
];
@@ -26,7 +27,7 @@ class Ticket_attachments extends Model
$name = $this->name;
$root = $this->path;
if (($drive == 'database' || !$drive) && $value && base64_decode($value, true) === false) {
if (($drive == 'database' || ! $drive) && $value && base64_decode($value, true) === false) {
$value = base64_encode($value);
}
if ($drive && $drive !== 'database') {

View File

@@ -7,7 +7,9 @@ use App\BaseModel;
class Ticket_source extends BaseModel
{
public $timestamps = false;
protected $table = 'ticket_source';
protected $fillable = [
'name', 'value', 'css_class',
];

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Tickets extends BaseModel
{
protected $table = 'tickets';
protected $fillable = ['id', 'ticket_number', 'num_sequence', 'user_id', 'priority_id', 'sla', 'help_topic_id', 'max_open_ticket', 'captcha', 'status', 'lock_by', 'lock_at', 'source', 'isoverdue', 'reopened', 'isanswered', 'is_deleted', 'closed', 'is_transfer', 'transfer_at', 'reopened_at', 'duedate', 'closed_at', 'last_message_at', 'last_response_at', 'created_at', 'updated_at', 'assigned_to'];
// public function attach(){
@@ -74,7 +75,7 @@ class Tickets extends BaseModel
public function setAssignedToAttribute($value)
{
if (!$value) {
if (! $value) {
$this->attributes['assigned_to'] = null;
} else {
$this->attributes['assigned_to'] = $value;

View File

@@ -7,5 +7,6 @@ use App\BaseModel;
class CountryCode extends BaseModel
{
protected $table = 'country_code';
protected $fillable = ['id', 'name', 'iso', 'nicename', 'iso3', 'numcode', 'phonecode', 'updated_at', 'created_at'];
}

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class Date_format extends BaseModel
{
public $timestamps = false;
protected $table = 'date_format';
protected $fillable = ['id', 'format'];
}

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class Date_time_format extends BaseModel
{
public $timestamps = false;
protected $table = 'date_time_format';
protected $fillable = ['id', 'format'];
}

View File

@@ -9,6 +9,7 @@ class Email extends BaseModel
/* Using Email table */
protected $table = 'email';
/* Set fillable fields in table */
protected $fillable = [
'id', 'template', 'sys_email', 'alert_email', 'admin_email', 'mta', 'email_fetching', 'strip',

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Form_type extends BaseModel
{
protected $table = 'form_type';
protected $fillable = [
'id', 'type',
];

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Form_visibility extends BaseModel
{
protected $table = 'form_visibility';
protected $fillable = [
'id', 'visibility',
];

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class Languages extends BaseModel
{
public $timestamps = false;
protected $table = 'languages';
protected $fillable = ['name', 'locale'];
}

View File

@@ -7,5 +7,6 @@ use App\BaseModel;
class Limit_Login extends BaseModel
{
protected $table = 'login_attempts';
protected $fillable = ['User', 'IP', 'Attempts', 'LastLogin', 'created_at', 'updated_at'];
}

View File

@@ -7,5 +7,6 @@ use App\BaseModel;
class Log_notification extends BaseModel
{
protected $table = 'log_notification';
protected $fillable = ['id', 'log'];
}

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class Logs extends BaseModel
{
public $timestamps = false;
protected $table = 'logs';
protected $fillable = ['id', 'level'];
}

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class MailboxProtocol extends BaseModel
{
public $timestamps = false;
protected $table = 'mailbox_protocol';
protected $fillable = ['id', 'name', 'value'];
}

View File

@@ -7,5 +7,6 @@ use App\BaseModel;
class Otp extends BaseModel
{
protected $table = 'user_verification';
protected $fillable = ['id', 'user_id', 'otp', 'temp_mobile', 'updated_at', 'created_at'];
}

View File

@@ -7,7 +7,9 @@ use App\BaseModel;
class Priority extends BaseModel
{
public $timestamps = false;
protected $table = 'ticket_priority';
protected $fillable = [
'id', 'name',
];

View File

@@ -7,6 +7,7 @@ use App\BaseModel;
class Ticket_thread extends BaseModel
{
protected $table = 'ticket_thread';
protected $fillable = [
'id', 'ticket_id', 'ticket_subject', 'ticket_message', 'time', 'poster', 'created_at', 'updated_at',
];

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class Time_format extends BaseModel
{
public $timestamps = false;
protected $table = 'time_format';
protected $fillable = ['id', 'format'];
}

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class Timezones extends BaseModel
{
public $timestamps = false;
protected $table = 'timezone';
protected $fillable = ['name', 'location'];
}

View File

@@ -7,5 +7,6 @@ use App\BaseModel;
class Version_Check extends BaseModel
{
protected $table = 'version_check';
protected $fillable = ['current_version', 'new_version', 'updated_at', 'created_at'];
}

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class WorkflowAction extends BaseModel
{
public $timestamps = false;
protected $table = 'workflow_action';
protected $fillable = ['id', 'workflow_id', 'condition', 'action', 'updated_at', 'created_at'];
}

View File

@@ -7,5 +7,6 @@ use App\BaseModel;
class WorkflowClose extends BaseModel
{
protected $table = 'workflow_close';
protected $fillable = ['id', 'days', 'condition', 'send_email', 'status', 'updated_at', 'created_at'];
}

View File

@@ -7,5 +7,6 @@ use App\BaseModel;
class WorkflowName extends BaseModel
{
protected $table = 'workflow_name';
protected $fillable = ['id', 'name', 'status', 'order', 'target', 'internal_note', 'updated_at', 'created_at'];
}

View File

@@ -7,6 +7,8 @@ use App\BaseModel;
class WorkflowRules extends BaseModel
{
public $timestamps = false;
protected $table = 'workflow_rules';
protected $fillable = ['id', 'workflow_id', 'matching_criteria', 'matching_scenario', 'matching_relation', 'matching_value', 'updated_at', 'created_at'];
}