From 7bd0d7b5bf7403fb6ace386ae2e2d684f6235f2f Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 27 Apr 2023 13:38:30 +0200 Subject: [PATCH] Apply suggestions from code review --- ...rationQueueCommentResponseUserNotificationEvent.class.php | 5 ++--- .../ModerationQueueCommentUserNotificationEvent.class.php | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentResponseUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentResponseUserNotificationEvent.class.php index ba938d7800..b761430789 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentResponseUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentResponseUserNotificationEvent.class.php @@ -49,9 +49,8 @@ class ModerationQueueCommentResponseUserNotificationEvent extends AbstractCommen /** * language item for the type name - * @var string|null */ - protected $typeName; + protected string $typeName; /** * @inheritDoc @@ -222,7 +221,7 @@ class ModerationQueueCommentResponseUserNotificationEvent extends AbstractCommen */ protected function getTypeName(): string { - if ($this->typeName === null) { + if (!isset($this->typeName)) { $moderationHandler = ObjectTypeCache::getInstance() ->getObjectType($this->getModerationQueue()->objectTypeID) ->getProcessor(); diff --git a/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentUserNotificationEvent.class.php b/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentUserNotificationEvent.class.php index 17a5666750..886cea9917 100644 --- a/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentUserNotificationEvent.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentUserNotificationEvent.class.php @@ -37,9 +37,8 @@ class ModerationQueueCommentUserNotificationEvent extends AbstractCommentUserNot /** * language item for the type name - * @var string */ - protected $typeName = ''; + protected string $typeName; /** * moderation queue object the notifications (indirectly) belong to -- 2.20.1