diff options
author | Anna <anna@nextcloud.com> | 2024-09-15 23:01:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-15 23:01:22 +0200 |
commit | 6892500405b689240e86527badbb91b1aa9d2e35 (patch) | |
tree | 6fa8f80741886d32a2b0106a4fa1da9992d0c954 /apps | |
parent | 6e983ce2075f96bc28de8367675c96c9473bcdfc (diff) | |
parent | 1ee833efab85f484469f15267c6b32bb0ce55d20 (diff) | |
download | nextcloud-server-6892500405b689240e86527badbb91b1aa9d2e35.tar.gz nextcloud-server-6892500405b689240e86527badbb91b1aa9d2e35.zip |
Merge pull request #48046 from nextcloud/refactor/self-class-reference
refactor: Replace __CLASS__ with ::class references
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/LoginListener.php | 12 | ||||
-rw-r--r-- | apps/user_ldap/lib/Service/UpdateGroupsService.php | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/apps/user_ldap/lib/LoginListener.php b/apps/user_ldap/lib/LoginListener.php index c417300b45e..f397f4694d2 100644 --- a/apps/user_ldap/lib/LoginListener.php +++ b/apps/user_ldap/lib/LoginListener.php @@ -42,7 +42,7 @@ class LoginListener implements IEventListener { public function onPostLogin(IUser $user): void { $this->logger->info( - __CLASS__ . ' - {user} postLogin', + self::class . ' - {user} postLogin', [ 'app' => 'user_ldap', 'user' => $user->getUID(), @@ -67,7 +67,7 @@ class LoginListener implements IEventListener { $groupObject = $this->groupManager->get($groupId); if ($groupObject === null) { $this->logger->error( - __CLASS__ . ' - group {group} could not be found (user {user})', + self::class . ' - group {group} could not be found (user {user})', [ 'app' => 'user_ldap', 'user' => $userId, @@ -81,7 +81,7 @@ class LoginListener implements IEventListener { } catch (Exception $e) { if ($e->getReason() !== Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) { $this->logger->error( - __CLASS__ . ' - group {group} membership failed to be added (user {user})', + self::class . ' - group {group} membership failed to be added (user {user})', [ 'app' => 'user_ldap', 'user' => $userId, @@ -96,7 +96,7 @@ class LoginListener implements IEventListener { $this->groupBackend->addRelationshipToCaches($userId, null, $groupId); $this->dispatcher->dispatchTyped(new UserAddedEvent($groupObject, $userObject)); $this->logger->info( - __CLASS__ . ' - {user} added to {group}', + self::class . ' - {user} added to {group}', [ 'app' => 'user_ldap', 'user' => $userId, @@ -110,7 +110,7 @@ class LoginListener implements IEventListener { } catch (Exception $e) { if ($e->getReason() !== Exception::REASON_DATABASE_OBJECT_NOT_FOUND) { $this->logger->error( - __CLASS__ . ' - group {group} membership failed to be removed (user {user})', + self::class . ' - group {group} membership failed to be removed (user {user})', [ 'app' => 'user_ldap', 'user' => $userId, @@ -125,7 +125,7 @@ class LoginListener implements IEventListener { $groupObject = $this->groupManager->get($groupId); if ($groupObject === null) { $this->logger->error( - __CLASS__ . ' - group {group} could not be found (user {user})', + self::class . ' - group {group} could not be found (user {user})', [ 'app' => 'user_ldap', 'user' => $userId, diff --git a/apps/user_ldap/lib/Service/UpdateGroupsService.php b/apps/user_ldap/lib/Service/UpdateGroupsService.php index 4c007f7201f..94f2a7fd4a1 100644 --- a/apps/user_ldap/lib/Service/UpdateGroupsService.php +++ b/apps/user_ldap/lib/Service/UpdateGroupsService.php @@ -90,7 +90,7 @@ class UpdateGroupsService { if ($e->getReason() !== Exception::REASON_DATABASE_OBJECT_NOT_FOUND) { /* If reason is not found something else removed the membership, that’s fine */ $this->logger->error( - __CLASS__ . ' - group {group} membership failed to be removed (user {user})', + self::class . ' - group {group} membership failed to be removed (user {user})', [ 'app' => 'user_ldap', 'user' => $removedUser, @@ -121,7 +121,7 @@ class UpdateGroupsService { if ($e->getReason() !== Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) { /* If reason is unique constraint something else added the membership, that’s fine */ $this->logger->error( - __CLASS__ . ' - group {group} membership failed to be added (user {user})', + self::class . ' - group {group} membership failed to be added (user {user})', [ 'app' => 'user_ldap', 'user' => $addedUser, @@ -167,7 +167,7 @@ class UpdateGroupsService { } catch (Exception $e) { if ($e->getReason() !== Exception::REASON_UNIQUE_CONSTRAINT_VIOLATION) { $this->logger->error( - __CLASS__ . ' - group {group} membership failed to be added (user {user})', + self::class . ' - group {group} membership failed to be added (user {user})', [ 'app' => 'user_ldap', 'user' => $user, |