Convert string references to ::class
PHP 5.5.9 adds the new static `class` property which provides the fully qualified class name. This is preferred over using strings for class names since the `class` property references are checked by PHP.
This commit is contained in:
@@ -14,11 +14,11 @@ class Kernel extends ConsoleKernel
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $commands = [
|
protected $commands = [
|
||||||
'App\Console\Commands\Inspire',
|
\App\Console\Commands\Inspire::class,
|
||||||
'App\Console\Commands\SendReport',
|
\App\Console\Commands\SendReport::class,
|
||||||
'App\Console\Commands\CloseWork',
|
\App\Console\Commands\CloseWork::class,
|
||||||
'App\Console\Commands\TicketFetch',
|
\App\Console\Commands\TicketFetch::class,
|
||||||
'App\Console\Commands\UpdateEncryption',
|
\App\Console\Commands\UpdateEncryption::class,
|
||||||
\App\Console\Commands\DropTables::class,
|
\App\Console\Commands\DropTables::class,
|
||||||
\App\Console\Commands\Install::class,
|
\App\Console\Commands\Install::class,
|
||||||
\App\Console\Commands\InstallDB::class,
|
\App\Console\Commands\InstallDB::class,
|
||||||
|
@@ -13,7 +13,7 @@ class QueueService extends Model
|
|||||||
|
|
||||||
public function extraFieldRelation()
|
public function extraFieldRelation()
|
||||||
{
|
{
|
||||||
$related = "App\Model\MailJob\FaveoQueue";
|
$related = \App\Model\MailJob\FaveoQueue::class;
|
||||||
|
|
||||||
return $this->hasMany($related, 'service_id');
|
return $this->hasMany($related, 'service_id');
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,7 @@ class Organization extends BaseModel
|
|||||||
|
|
||||||
public function userRelation()
|
public function userRelation()
|
||||||
{
|
{
|
||||||
$related = "App\Model\helpdesk\Agent_panel\User_org";
|
$related = \App\Model\helpdesk\Agent_panel\User_org::class;
|
||||||
|
|
||||||
return $this->hasMany($related, 'org_id');
|
return $this->hasMany($related, 'org_id');
|
||||||
}
|
}
|
||||||
|
@@ -44,7 +44,7 @@ class Emails extends BaseModel
|
|||||||
|
|
||||||
public function extraFieldRelation()
|
public function extraFieldRelation()
|
||||||
{
|
{
|
||||||
$related = "App\Model\MailJob\FaveoMail";
|
$related = \App\Model\MailJob\FaveoMail::class;
|
||||||
|
|
||||||
return $this->hasMany($related, 'email_id');
|
return $this->hasMany($related, 'email_id');
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@ class Fields extends BaseModel
|
|||||||
|
|
||||||
public function valueRelation()
|
public function valueRelation()
|
||||||
{
|
{
|
||||||
$related = "App\Model\helpdesk\Form\FieldValue";
|
$related = \App\Model\helpdesk\Form\FieldValue::class;
|
||||||
|
|
||||||
return $this->hasMany($related, 'field_id');
|
return $this->hasMany($related, 'field_id');
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@ class Forms extends BaseModel
|
|||||||
|
|
||||||
public function fieldRelation()
|
public function fieldRelation()
|
||||||
{
|
{
|
||||||
$related = "App\Model\helpdesk\Form\Fields";
|
$related = \App\Model\helpdesk\Form\Fields::class;
|
||||||
|
|
||||||
return $this->hasMany($related);
|
return $this->hasMany($related);
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,7 @@ class Forms extends BaseModel
|
|||||||
|
|
||||||
public function formValueRelation()
|
public function formValueRelation()
|
||||||
{
|
{
|
||||||
$related = "App\Model\helpdesk\Form\FieldValue";
|
$related = \App\Model\helpdesk\Form\FieldValue::class;
|
||||||
|
|
||||||
return $this->hasMany($related, 'child_id');
|
return $this->hasMany($related, 'child_id');
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@ class Help_topic extends BaseModel
|
|||||||
|
|
||||||
public function department()
|
public function department()
|
||||||
{
|
{
|
||||||
$related = 'App\Model\helpdesk\Agent\Department';
|
$related = \App\Model\helpdesk\Agent\Department::class;
|
||||||
$foreignKey = 'department';
|
$foreignKey = 'department';
|
||||||
|
|
||||||
return $this->belongsTo($related, $foreignKey);
|
return $this->belongsTo($related, $foreignKey);
|
||||||
|
@@ -15,7 +15,7 @@ class Notification extends BaseModel
|
|||||||
|
|
||||||
public function type()
|
public function type()
|
||||||
{
|
{
|
||||||
$related = 'App\Model\helpdesk\Notification\NotificationType';
|
$related = \App\Model\helpdesk\Notification\NotificationType::class;
|
||||||
$id = 'type_id';
|
$id = 'type_id';
|
||||||
|
|
||||||
return $this->belongsTo($related, $id);
|
return $this->belongsTo($related, $id);
|
||||||
@@ -23,7 +23,7 @@ class Notification extends BaseModel
|
|||||||
|
|
||||||
public function model()
|
public function model()
|
||||||
{
|
{
|
||||||
$related = 'App\Model\helpdesk\Ticket\Tickets';
|
$related = \App\Model\helpdesk\Ticket\Tickets::class;
|
||||||
$id = 'model_id';
|
$id = 'model_id';
|
||||||
|
|
||||||
return $this->belongsTo($related, $id);
|
return $this->belongsTo($related, $id);
|
||||||
@@ -31,7 +31,7 @@ class Notification extends BaseModel
|
|||||||
|
|
||||||
public function userNotification()
|
public function userNotification()
|
||||||
{
|
{
|
||||||
$related = 'App\Model\helpdesk\Notification\UserNotification';
|
$related = \App\Model\helpdesk\Notification\UserNotification::class;
|
||||||
$foreignKey = 'notification_id';
|
$foreignKey = 'notification_id';
|
||||||
|
|
||||||
return $this->hasMany($related, $foreignKey);
|
return $this->hasMany($related, $foreignKey);
|
||||||
|
@@ -15,7 +15,7 @@ class UserNotification extends BaseModel
|
|||||||
|
|
||||||
public function notification()
|
public function notification()
|
||||||
{
|
{
|
||||||
$related = 'App\Model\helpdesk\Notification\Notification';
|
$related = \App\Model\helpdesk\Notification\Notification::class;
|
||||||
$id = 'notification_id';
|
$id = 'notification_id';
|
||||||
|
|
||||||
return $this->belongsTo($related, $id);
|
return $this->belongsTo($related, $id);
|
||||||
@@ -23,7 +23,7 @@ class UserNotification extends BaseModel
|
|||||||
|
|
||||||
public function users()
|
public function users()
|
||||||
{
|
{
|
||||||
$related = 'App\User';
|
$related = \App\User::class;
|
||||||
$id = 'user_id';
|
$id = 'user_id';
|
||||||
|
|
||||||
return $this->belongsTo($related, $id);
|
return $this->belongsTo($related, $id);
|
||||||
|
@@ -16,7 +16,7 @@ class Ticket_Thread extends Model
|
|||||||
|
|
||||||
public function attach()
|
public function attach()
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Model\helpdesk\Ticket\Ticket_attachments', 'thread_id');
|
return $this->hasMany(\App\Model\helpdesk\Ticket\Ticket_attachments::class, 'thread_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete()
|
public function delete()
|
||||||
@@ -149,7 +149,7 @@ class Ticket_Thread extends Model
|
|||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
$related = 'App\User';
|
$related = \App\User::class;
|
||||||
$foreignKey = 'user_id';
|
$foreignKey = 'user_id';
|
||||||
|
|
||||||
return $this->belongsTo($related, $foreignKey);
|
return $this->belongsTo($related, $foreignKey);
|
||||||
|
@@ -16,7 +16,7 @@ class Ticket_ThreadOld extends Model
|
|||||||
|
|
||||||
public function attach()
|
public function attach()
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Model\helpdesk\Ticket\Ticket_attachments', 'thread_id');
|
return $this->hasMany(\App\Model\helpdesk\Ticket\Ticket_attachments::class, 'thread_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete()
|
public function delete()
|
||||||
|
@@ -16,17 +16,17 @@ class Tickets extends BaseModel
|
|||||||
// }
|
// }
|
||||||
public function thread()
|
public function thread()
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Model\helpdesk\Ticket\Ticket_Thread', 'ticket_id');
|
return $this->hasMany(\App\Model\helpdesk\Ticket\Ticket_Thread::class, 'ticket_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function collaborator()
|
public function collaborator()
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Model\helpdesk\Ticket\Ticket_Collaborator', 'ticket_id');
|
return $this->hasMany(\App\Model\helpdesk\Ticket\Ticket_Collaborator::class, 'ticket_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function helptopic()
|
public function helptopic()
|
||||||
{
|
{
|
||||||
$related = 'App\Model\helpdesk\Manage\Help_topic';
|
$related = \App\Model\helpdesk\Manage\Help_topic::class;
|
||||||
$foreignKey = 'help_topic_id';
|
$foreignKey = 'help_topic_id';
|
||||||
|
|
||||||
return $this->belongsTo($related, $foreignKey);
|
return $this->belongsTo($related, $foreignKey);
|
||||||
@@ -34,7 +34,7 @@ class Tickets extends BaseModel
|
|||||||
|
|
||||||
public function formdata()
|
public function formdata()
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Model\helpdesk\Ticket\Ticket_Form_Data', 'ticket_id');
|
return $this->hasMany(\App\Model\helpdesk\Ticket\Ticket_Form_Data::class, 'ticket_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function extraFields()
|
public function extraFields()
|
||||||
@@ -96,7 +96,7 @@ class Tickets extends BaseModel
|
|||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
{
|
{
|
||||||
$related = "App\User";
|
$related = \App\User::class;
|
||||||
$foreignKey = 'user_id';
|
$foreignKey = 'user_id';
|
||||||
|
|
||||||
return $this->belongsTo($related, $foreignKey);
|
return $this->belongsTo($related, $foreignKey);
|
||||||
|
@@ -27,20 +27,20 @@ class ComposerServiceProvider extends ServiceProvider
|
|||||||
'themes.default1.admin.helpdesk.setting',
|
'themes.default1.admin.helpdesk.setting',
|
||||||
$service_desk,
|
$service_desk,
|
||||||
],
|
],
|
||||||
'App\Http\ViewComposers\AgentLayout'
|
\App\Http\ViewComposers\AgentLayout::class
|
||||||
);
|
);
|
||||||
view()->composer(
|
view()->composer(
|
||||||
[
|
[
|
||||||
'themes.default1.update.notification',
|
'themes.default1.update.notification',
|
||||||
],
|
],
|
||||||
'App\Http\ViewComposers\UpdateNotification'
|
\App\Http\ViewComposers\UpdateNotification::class
|
||||||
);
|
);
|
||||||
view()->composer(
|
view()->composer(
|
||||||
[
|
[
|
||||||
'themes.default1.agent.layout.agent',
|
'themes.default1.agent.layout.agent',
|
||||||
'themes.default1.admin.layout.admin',
|
'themes.default1.admin.layout.admin',
|
||||||
],
|
],
|
||||||
'App\Http\ViewComposers\AuthUser'
|
\App\Http\ViewComposers\AuthUser::class
|
||||||
);
|
);
|
||||||
view()->composer(
|
view()->composer(
|
||||||
[
|
[
|
||||||
@@ -48,7 +48,7 @@ class ComposerServiceProvider extends ServiceProvider
|
|||||||
'themes.default1.agent.layout.agent',
|
'themes.default1.agent.layout.agent',
|
||||||
'themes.default1.client.layout.client',
|
'themes.default1.client.layout.client',
|
||||||
],
|
],
|
||||||
'App\Http\ViewComposers\UserLanguage'
|
\App\Http\ViewComposers\UserLanguage::class
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -63,7 +63,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
|||||||
|
|
||||||
public function avatar()
|
public function avatar()
|
||||||
{
|
{
|
||||||
$related = 'App\UserAdditionalInfo';
|
$related = \App\UserAdditionalInfo::class;
|
||||||
$foreignKey = 'owner';
|
$foreignKey = 'owner';
|
||||||
|
|
||||||
return $this->hasMany($related, $foreignKey)->select('value')->where('key', 'avatar')->first();
|
return $this->hasMany($related, $foreignKey)->select('value')->where('key', 'avatar')->first();
|
||||||
@@ -71,7 +71,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
|||||||
|
|
||||||
public function getOrganizationRelation()
|
public function getOrganizationRelation()
|
||||||
{
|
{
|
||||||
$related = "App\Model\helpdesk\Agent_panel\User_org";
|
$related = \App\Model\helpdesk\Agent_panel\User_org::class;
|
||||||
$user_relation = $this->hasMany($related, 'user_id');
|
$user_relation = $this->hasMany($related, 'user_id');
|
||||||
$relation = $user_relation->first();
|
$relation = $user_relation->first();
|
||||||
if ($relation) {
|
if ($relation) {
|
||||||
|
@@ -163,11 +163,11 @@ return [
|
|||||||
/*
|
/*
|
||||||
* Application Service Providers...
|
* Application Service Providers...
|
||||||
*/
|
*/
|
||||||
'App\Providers\AppServiceProvider',
|
App\Providers\AppServiceProvider::class,
|
||||||
'App\Providers\EventServiceProvider',
|
App\Providers\EventServiceProvider::class,
|
||||||
'App\Providers\RouteServiceProvider',
|
App\Providers\RouteServiceProvider::class,
|
||||||
'App\Providers\ConfigServiceProvider',
|
App\Providers\ConfigServiceProvider::class,
|
||||||
'App\Providers\ComposerServiceProvider',
|
App\Providers\ComposerServiceProvider::class,
|
||||||
'Propaganistas\LaravelPhone\LaravelPhoneServiceProvider',
|
'Propaganistas\LaravelPhone\LaravelPhoneServiceProvider',
|
||||||
'Bugsnag\BugsnagLaravel\BugsnagLaravelServiceProvider',
|
'Bugsnag\BugsnagLaravel\BugsnagLaravelServiceProvider',
|
||||||
'Vsmoraes\Pdf\PdfServiceProvider',
|
'Vsmoraes\Pdf\PdfServiceProvider',
|
||||||
@@ -238,9 +238,9 @@ return [
|
|||||||
'Bugsnag' => 'Bugsnag\BugsnagLaravel\BugsnagFacade',
|
'Bugsnag' => 'Bugsnag\BugsnagLaravel\BugsnagFacade',
|
||||||
'PDF' => 'Vsmoraes\Pdf\PdfFacade',
|
'PDF' => 'Vsmoraes\Pdf\PdfFacade',
|
||||||
'Gravatar' => 'Thomaswelton\LaravelGravatar\Facades\Gravatar',
|
'Gravatar' => 'Thomaswelton\LaravelGravatar\Facades\Gravatar',
|
||||||
'UTC' => 'App\Http\Controllers\Agent\helpdesk\TicketController',
|
'UTC' => App\Http\Controllers\Agent\helpdesk\TicketController::class,
|
||||||
'Ttable' => 'App\Http\Controllers\Agent\helpdesk\TicketController', //to use getTable function.
|
'Ttable' => App\Http\Controllers\Agent\helpdesk\TicketController::class, //to use getTable function.
|
||||||
'SMTPS' => 'App\Http\Controllers\HomeController',
|
'SMTPS' => App\Http\Controllers\HomeController::class,
|
||||||
'Datatable' => 'Chumper\Datatable\Facades\DatatableFacade',
|
'Datatable' => 'Chumper\Datatable\Facades\DatatableFacade',
|
||||||
'Zipper' => 'Chumper\Zipper\Zipper',
|
'Zipper' => 'Chumper\Zipper\Zipper',
|
||||||
'JWTAuth' => 'Tymon\JWTAuth\Facades\JWTAuth',
|
'JWTAuth' => 'Tymon\JWTAuth\Facades\JWTAuth',
|
||||||
@@ -253,7 +253,7 @@ return [
|
|||||||
'Debugbar' => Barryvdh\Debugbar\Facade::class,
|
'Debugbar' => Barryvdh\Debugbar\Facade::class,
|
||||||
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
|
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
|
||||||
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
|
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
|
||||||
'UnAuth' => 'App\Http\Controllers\Client\helpdesk\UnAuthController',
|
'UnAuth' => App\Http\Controllers\Client\helpdesk\UnAuthController::class,
|
||||||
'Finder' => App\Helper\Finder::class,
|
'Finder' => App\Helper\Finder::class,
|
||||||
'Datatables' => Yajra\Datatables\Facades\Datatables::class,
|
'Datatables' => Yajra\Datatables\Facades\Datatables::class,
|
||||||
'Notification' => Illuminate\Support\Facades\Notification::class,
|
'Notification' => Illuminate\Support\Facades\Notification::class,
|
||||||
|
Reference in New Issue
Block a user