From dc7cf910faef20e8ad0a584c2c66d3cf3b6a0ab6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 18 Sep 2026 11:42:38 +0930 Subject: [PATCH] get_class to ::class --- .../Commands/Admin/MediaMoveStorageLocalToCloud.php | 2 +- app/Http/Controllers/AccountController.php | 8 ++++---- app/Http/Controllers/AdminShadowFilterController.php | 2 +- app/Jobs/GroupsPipeline/NewCommentPipeline.php | 2 +- .../NotificationPipeline/NotificationWarmUserCache.php | 2 +- app/Jobs/StatusPipeline/StatusDelete.php | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Console/Commands/Admin/MediaMoveStorageLocalToCloud.php b/app/Console/Commands/Admin/MediaMoveStorageLocalToCloud.php index 1fdc3bfe6..81e850ada 100644 --- a/app/Console/Commands/Admin/MediaMoveStorageLocalToCloud.php +++ b/app/Console/Commands/Admin/MediaMoveStorageLocalToCloud.php @@ -508,7 +508,7 @@ class MediaMoveStorageLocalToCloud extends Command 'thumbnail_path' => $media->thumbnail_path, 'size' => (int) $media->size, 'cloud_destination' => $this->cloudDestination($mediaPath, $cloudDisk), - 'exception' => get_class($e), + 'exception' => $e::class, 'error' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine(), diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 14dde33b9..f57c51404 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -115,7 +115,7 @@ class AccountController extends Controller if ($profile->id == $pid) { return abort(403); } - $class = get_class($profile); + $class = $profile::class; $filterable['id'] = $profile->id; $filterable['type'] = $class; break; @@ -160,7 +160,7 @@ class AccountController extends Controller if ($profile->id == $pid) { return abort(403); } - $class = get_class($profile); + $class = $profile::class; $filterable['id'] = $profile->id; $filterable['type'] = $class; break; @@ -219,7 +219,7 @@ class AccountController extends Controller if ($profile->id == $pid || ($profile->user && $profile->user->is_admin == true)) { return abort(403); } - $class = get_class($profile); + $class = $profile::class; $filterable['id'] = $profile->id; $filterable['type'] = $class; @@ -297,7 +297,7 @@ class AccountController extends Controller if ($profile->id == $pid) { return abort(403); } - $class = get_class($profile); + $class = $profile::class; $filterable['id'] = $profile->id; $filterable['type'] = $class; break; diff --git a/app/Http/Controllers/AdminShadowFilterController.php b/app/Http/Controllers/AdminShadowFilterController.php index e1bf81254..663a1897c 100644 --- a/app/Http/Controllers/AdminShadowFilterController.php +++ b/app/Http/Controllers/AdminShadowFilterController.php @@ -82,7 +82,7 @@ class AdminShadowFilterController extends Controller AdminShadowFilter::updateOrCreate([ 'item_id' => $profile->id, - 'item_type' => get_class($profile), + 'item_type' => $profile::class, ], [ 'is_local' => $profile->domain === null, 'note' => $request->input('note'), diff --git a/app/Jobs/GroupsPipeline/NewCommentPipeline.php b/app/Jobs/GroupsPipeline/NewCommentPipeline.php index 69c7fc160..5c024c02b 100644 --- a/app/Jobs/GroupsPipeline/NewCommentPipeline.php +++ b/app/Jobs/GroupsPipeline/NewCommentPipeline.php @@ -57,7 +57,7 @@ class NewCommentPipeline implements ShouldQueue $status = $this->status; $parent = $this->parent; $profile = $this->status->profile; - $parentClass = get_class($parent); + $parentClass = $parent::class; $groupId = $status->group_id; $postId = $status->id; diff --git a/app/Jobs/NotificationPipeline/NotificationWarmUserCache.php b/app/Jobs/NotificationPipeline/NotificationWarmUserCache.php index 8cf4b5aaa..793f69614 100644 --- a/app/Jobs/NotificationPipeline/NotificationWarmUserCache.php +++ b/app/Jobs/NotificationPipeline/NotificationWarmUserCache.php @@ -80,7 +80,7 @@ class NotificationWarmUserCache implements ShouldBeUnique, ShouldQueue } catch (\Exception $e) { Log::error('Failed to warm notification cache', [ 'profile_id' => $this->pid, - 'exception' => get_class($e), + 'exception' => $e::class, 'message' => $e->getMessage(), 'attempt' => $this->attempts(), ]); diff --git a/app/Jobs/StatusPipeline/StatusDelete.php b/app/Jobs/StatusPipeline/StatusDelete.php index 78959fd3a..c4eb6753c 100644 --- a/app/Jobs/StatusPipeline/StatusDelete.php +++ b/app/Jobs/StatusPipeline/StatusDelete.php @@ -229,7 +229,7 @@ class StatusDelete implements ShouldQueue 'status_id' => $status->id, 'inbox' => $audience[$i] ?? null, 'result' => $res instanceof \Throwable - ? get_class($res).': '.$res->getMessage() + ? $res::class.': '.$res->getMessage() : $res->status().' '.substr($res->body(), 0, 300), ]); });