Run php-cs-fixer
authorCyperghost <olaf_schmitz_1@t-online.de>
Mon, 25 Mar 2024 10:00:44 +0000 (11:00 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Mon, 25 Mar 2024 10:00:44 +0000 (11:00 +0100)
wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php
wcfsetup/install/files/lib/system/comment/manager/ModerationQueueCommentManager.class.php
wcfsetup/install/files/lib/system/comment/manager/PageCommentManager.class.php
wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php

index 4ee1c76c56530952e11bfec6419a16170a64a8ed..834e6caea5cc19692a3868a12d7aa8536ec07ce4 100644 (file)
@@ -82,6 +82,7 @@ class ArticleCommentManager extends AbstractCommentManager implements IViewableL
         if (!$articleContent->getArticle()->canRead($user)) {
             return false;
         }
+
         return (bool)$user->getPermission($this->permissionCanModerate);
     }
 
index ea81183be4837c0f65b0d55b747b43b85c439f9a..9ebc60ddd242ec144e6c4ee137f7d97561355d97 100644 (file)
@@ -30,7 +30,8 @@ class ModerationQueueCommentManager extends AbstractCommentManager implements IC
     public function canModerateObject(int $objectTypeID, int $objectID, UserProfile $user): bool
     {
         $entry = new ModerationQueue($objectID);
-        return ($entry->canEdit($user->getDecoratedObject()));
+
+        return $entry->canEdit($user->getDecoratedObject());
     }
 
     /**
index d74209da1e6092fed3076efeec88222205c9a6ea..ee0c2294e3d8080f407ad2fb438b66064f64a1cb 100644 (file)
@@ -81,6 +81,7 @@ class PageCommentManager extends AbstractCommentManager implements IViewableLike
         if (!$page->isAccessible($user->getDecoratedObject())) {
             return false;
         }
+
         return (bool)$user->getPermission($this->permissionCanModerate);
     }
 
index 0727551ccce69880987cb55f13cc6dd96b793885..3738efe6ce12a520011167f02447871d6d7b908c 100644 (file)
@@ -104,12 +104,14 @@ class UserProfileCommentManager extends AbstractCommentManager implements
         /** @see UserProfile::isProtected() */
         if (
             !(
-            $user->getPermission('admin.general.canViewPrivateUserOptions')
+                $user->getPermission('admin.general.canViewPrivateUserOptions')
             || $userProfile->isAccessible('canViewProfile', $user->userID)
-            || $userProfile->userID === $user->userID)
+            || $userProfile->userID === $user->userID
+            )
         ) {
             return false;
         }
+
         return (bool)$user->getPermission($this->permissionCanModerate);
     }