From 1ee833efab85f484469f15267c6b32bb0ce55d20 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Sun, 15 Sep 2024 21:40:55 +0200 Subject: refactor: Replace __CLASS__ with ::class references Signed-off-by: Christoph Wurst --- lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php | 2 +- lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php | 2 +- lib/public/Files/LockNotAcquiredException.php | 2 +- lib/public/HintException.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php b/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php index 32571c72fae..bf076240bf8 100644 --- a/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php +++ b/lib/private/Security/Bruteforce/Backend/MemoryCacheBackend.php @@ -19,7 +19,7 @@ class MemoryCacheBackend implements IBackend { ICacheFactory $cacheFactory, private ITimeFactory $timeFactory, ) { - $this->cache = $cacheFactory->createDistributed(__CLASS__); + $this->cache = $cacheFactory->createDistributed(self::class); } private function hash( diff --git a/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php b/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php index 84eb9fbd084..4c33b49d05e 100644 --- a/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php +++ b/lib/private/Security/RateLimiting/Backend/MemoryCacheBackend.php @@ -27,7 +27,7 @@ class MemoryCacheBackend implements IBackend { ICacheFactory $cacheFactory, private ITimeFactory $timeFactory, ) { - $this->cache = $cacheFactory->createDistributed(__CLASS__); + $this->cache = $cacheFactory->createDistributed(self::class); } private function hash( diff --git a/lib/public/Files/LockNotAcquiredException.php b/lib/public/Files/LockNotAcquiredException.php index 19e0bbc2543..93d861c248f 100644 --- a/lib/public/Files/LockNotAcquiredException.php +++ b/lib/public/Files/LockNotAcquiredException.php @@ -35,6 +35,6 @@ class LockNotAcquiredException extends \Exception { * @since 7.0.0 */ public function __toString(): string { - return __CLASS__ . ": [{$this->code}]: {$this->message}\n"; + return self::class . ": [{$this->code}]: {$this->message}\n"; } } diff --git a/lib/public/HintException.php b/lib/public/HintException.php index 97abf777ab1..6d9684bddea 100644 --- a/lib/public/HintException.php +++ b/lib/public/HintException.php @@ -43,7 +43,7 @@ class HintException extends \Exception { * @return string */ public function __toString(): string { - return __CLASS__ . ": [{$this->code}]: {$this->message} ({$this->hint})\n"; + return self::class . ": [{$this->code}]: {$this->message} ({$this->hint})\n"; } /** -- cgit v1.2.3