Apply suggestions from code review
authorMarcel Werk <burntime@woltlab.com>
Thu, 27 Apr 2023 11:38:30 +0000 (13:38 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 27 Apr 2023 11:38:30 +0000 (13:38 +0200)
wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentResponseUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/ModerationQueueCommentUserNotificationEvent.class.php

index ba938d78005e9b0cc7c028638276e82d206ed523..b7614307890656658ef0bd20647788c5708746e9 100644 (file)
@@ -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();
index 17a5666750bc395f5da7dc5798b6ded3cc251157..886cea99174f1437451732ad703dafecd4c20f81 100644 (file)
@@ -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