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:
Shift
2023-01-03 08:25:43 +00:00
parent f9ab4d057e
commit 9a6f1788a4
15 changed files with 40 additions and 40 deletions

View File

@@ -16,7 +16,7 @@ class Help_topic extends BaseModel
public function department()
{
$related = 'App\Model\helpdesk\Agent\Department';
$related = \App\Model\helpdesk\Agent\Department::class;
$foreignKey = 'department';
return $this->belongsTo($related, $foreignKey);