diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-10-10 12:40:31 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-10-15 10:40:25 +0200 |
commit | 1580c8612b01bfa780d1a7372080a27d182fb7dd (patch) | |
tree | b2776d0cd254ac9d6e54828978ce18b702f550d5 /apps/files_versions/lib/Storage.php | |
parent | 4ff9b3e0ce53227e2be47c4c2dcb1fdc3e540b5f (diff) | |
download | nextcloud-server-1580c8612b01bfa780d1a7372080a27d182fb7dd.tar.gz nextcloud-server-1580c8612b01bfa780d1a7372080a27d182fb7dd.zip |
chore(apps): Apply new rector configuration to autouse classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_versions/lib/Storage.php')
-rw-r--r-- | apps/files_versions/lib/Storage.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index af14f8e4b9f..e5849bf936d 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -12,6 +12,7 @@ use OC\Files\Search\SearchBinaryOperator; use OC\Files\Search\SearchComparison; use OC\Files\Search\SearchQuery; use OC\Files\View; +use OC\User\NoUserException; use OC_User; use OCA\Files_Sharing\SharedMount; use OCA\Files_Versions\AppInfo\Application; @@ -37,6 +38,8 @@ use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; use OCP\Lock\ILockingProvider; +use OCP\Server; +use OCP\Util; use Psr\Log\LoggerInterface; class Storage { @@ -68,7 +71,7 @@ class Storage { 6 => ['intervalEndsAfter' => -1, 'step' => 604800], ]; - /** @var \OCA\Files_Versions\AppInfo\Application */ + /** @var Application */ private static $application; /** @@ -598,7 +601,7 @@ class Storage { $version->delete(); \OC_Hook::emit('\OCP\Versions', 'delete', ['path' => $internalPath, 'trigger' => self::DELETE_TRIGGER_RETENTION_CONSTRAINT]); } catch (NotPermittedException $e) { - \OCP\Server::get(LoggerInterface::class)->error("Missing permissions to delete version: {$internalPath}", ['app' => 'files_versions', 'exception' => $e]); + Server::get(LoggerInterface::class)->error("Missing permissions to delete version: {$internalPath}", ['app' => 'files_versions', 'exception' => $e]); } } } @@ -814,7 +817,7 @@ class Storage { $user = \OC::$server->get(IUserManager::class)->get($uid); if (is_null($user)) { $logger->error('Backends provided no user object for ' . $uid, ['app' => 'files_versions']); - throw new \OC\User\NoUserException('Backends provided no user object for ' . $uid); + throw new NoUserException('Backends provided no user object for ' . $uid); } \OC_Util::setupFS($uid); @@ -841,7 +844,7 @@ class Storage { $quota = Filesystem::free_space('/'); $softQuota = false; } else { - $quota = \OCP\Util::computerFileSize($quota); + $quota = Util::computerFileSize($quota); } // make sure that we have the current size of the version history |