mirror of
https://github.com/flarum/core.git
synced 2025-08-06 00:17:31 +02:00
Use ::class
syntax to fetch class name instead of get_class()
function (#3910)
This commit is contained in:
@@ -24,7 +24,7 @@ class FlagSerializer extends AbstractSerializer
|
||||
{
|
||||
if (! ($model instanceof Flag)) {
|
||||
throw new InvalidArgumentException(
|
||||
get_class($this).' can only serialize instances of '.Flag::class
|
||||
$this::class.' can only serialize instances of '.Flag::class
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ class TaskSerializer extends AbstractSerializer
|
||||
{
|
||||
if (! ($model instanceof Task)) {
|
||||
throw new InvalidArgumentException(
|
||||
get_class($this).' can only serialize instances of '.Task::class
|
||||
$this::class.' can only serialize instances of '.Task::class
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,7 @@ class TagSerializer extends AbstractSerializer
|
||||
{
|
||||
if (! ($model instanceof Tag)) {
|
||||
throw new InvalidArgumentException(
|
||||
get_class($this).' can only serialize instances of '.Tag::class
|
||||
$this::class.' can only serialize instances of '.Tag::class
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user