1
0
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:
Ngô Quốc Đạt
2023-10-29 20:43:58 +07:00
committed by GitHub
parent 2950290ad1
commit 015529ff1e
25 changed files with 37 additions and 37 deletions

View File

@@ -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
);
}

View File

@@ -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
);
}

View File

@@ -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
);
}