From 82fb8f850828d24f551ad5ef3b8523486e5104df Mon Sep 17 00:00:00 2001 From: provokateurin Date: Wed, 14 May 2025 15:51:42 +0200 Subject: refactor: Extend rector to core/ Signed-off-by: provokateurin --- core/Command/Info/File.php | 3 ++- core/Command/Info/FileUtils.php | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'core/Command/Info') diff --git a/core/Command/Info/File.php b/core/Command/Info/File.php index c21c2e666fb..287bd0e29cb 100644 --- a/core/Command/Info/File.php +++ b/core/Command/Info/File.php @@ -9,6 +9,7 @@ namespace OC\Core\Command\Info; use OC\Files\ObjectStore\ObjectStoreStorage; use OC\Files\Storage\Wrapper\Encryption; +use OC\Files\Storage\Wrapper\Wrapper; use OC\Files\View; use OCA\Files_External\Config\ExternalMountPoint; use OCA\GroupFolders\Mount\GroupMountPoint; @@ -176,7 +177,7 @@ class File extends Command { if ($input->getOption('storage-tree')) { $storageTmp = $storage; $storageClass = get_class($storageTmp) . ' (cache:' . get_class($storageTmp->getCache()) . ')'; - while ($storageTmp instanceof \OC\Files\Storage\Wrapper\Wrapper) { + while ($storageTmp instanceof Wrapper) { $storageTmp = $storageTmp->getWrapperStorage(); $storageClass .= "\n\t" . '> ' . get_class($storageTmp) . ' (cache:' . get_class($storageTmp->getCache()) . ')'; } diff --git a/core/Command/Info/FileUtils.php b/core/Command/Info/FileUtils.php index 5de5f5fcaa6..4de0fbd5faa 100644 --- a/core/Command/Info/FileUtils.php +++ b/core/Command/Info/FileUtils.php @@ -8,6 +8,7 @@ declare(strict_types=1); namespace OC\Core\Command\Info; +use OC\User\NoUserException; use OCA\Circles\MountManager\CircleMount; use OCA\Files_External\Config\ExternalMountPoint; use OCA\Files_Sharing\SharedMount; @@ -21,6 +22,7 @@ use OCP\Files\IRootFolder; use OCP\Files\Mount\IMountPoint; use OCP\Files\Node; use OCP\Files\NotFoundException; +use OCP\Files\NotPermittedException; use OCP\Share\IShare; use OCP\Util; use Symfony\Component\Console\Output\OutputInterface; @@ -35,8 +37,8 @@ class FileUtils { /** * @param FileInfo $file * @return array - * @throws \OCP\Files\NotPermittedException - * @throws \OC\User\NoUserException + * @throws NotPermittedException + * @throws NoUserException */ public function getFilesByUser(FileInfo $file): array { $id = $file->getId(); -- cgit v1.2.3