diff --git a/apps/files/lib/BackgroundJob/ScanFiles.php b/apps/files/lib/BackgroundJob/ScanFiles.php index 250338e1262..84846b9b55d 100644 --- a/apps/files/lib/BackgroundJob/ScanFiles.php +++ b/apps/files/lib/BackgroundJob/ScanFiles.php @@ -30,7 +30,6 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\IDBConnection; use OCP\ILogger; -use OCP\IUserManager; /** * Class ScanFiles is a background job used to run the file scanner over the user @@ -57,10 +56,10 @@ class ScanFiles extends \OC\BackgroundJob\TimedJob { * @param IDBConnection $connection */ public function __construct( - IConfig $config, + IConfig $config, IEventDispatcher $dispatcher, - ILogger $logger, - IDBConnection $connection + ILogger $logger, + IDBConnection $connection ) { // Run once per 10 minutes $this->setInterval(60 * 10); diff --git a/apps/files/tests/BackgroundJob/ScanFilesTest.php b/apps/files/tests/BackgroundJob/ScanFilesTest.php index 2b70b3bd49c..7a9285a3821 100644 --- a/apps/files/tests/BackgroundJob/ScanFilesTest.php +++ b/apps/files/tests/BackgroundJob/ScanFilesTest.php @@ -31,7 +31,6 @@ use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\ILogger; use OCP\IUser; -use OCP\IUserManager; use Test\TestCase; use Test\Traits\MountProviderTrait; use Test\Traits\UserTrait; @@ -55,7 +54,6 @@ class ScanFilesTest extends TestCase { parent::setUp(); $config = $this->createMock(IConfig::class); - $userManager = $this->createMock(IUserManager::class); $dispatcher = $this->createMock(IEventDispatcher::class); $logger = $this->createMock(ILogger::class); $connection = \OC::$server->getDatabaseConnection(); @@ -64,7 +62,6 @@ class ScanFilesTest extends TestCase { $this->scanFiles = $this->getMockBuilder('\OCA\Files\BackgroundJob\ScanFiles') ->setConstructorArgs([ $config, - $userManager, $dispatcher, $logger, $connection, diff --git a/apps/workflowengine/lib/Check/FileSystemTags.php b/apps/workflowengine/lib/Check/FileSystemTags.php index d4c97723aac..c9cce240eb4 100644 --- a/apps/workflowengine/lib/Check/FileSystemTags.php +++ b/apps/workflowengine/lib/Check/FileSystemTags.php @@ -130,8 +130,8 @@ class FileSystemTags implements ICheck, IFileCheck { // TODO: Fix caching inside group folders // Do not cache file ids inside group folders because multiple file ids might be mapped to // the same combination of cache id + path. - $shouldCacheFileIds = !$this->storage - ->instanceOfStorage(\OCA\GroupFolders\Mount\GroupFolderStorage::class); + /** @psalm-suppress InvalidArgument */ + $shouldCacheFileIds = !$this->storage->instanceOfStorage(\OCA\GroupFolders\Mount\GroupFolderStorage::class); $cacheId = $cache->getNumericStorageId(); if ($shouldCacheFileIds && isset($this->fileIds[$cacheId][$path])) { return $this->fileIds[$cacheId][$path]; diff --git a/tests/lib/Files/Utils/ScannerTest.php b/tests/lib/Files/Utils/ScannerTest.php index 376e72e6811..0a4a4bd9b16 100644 --- a/tests/lib/Files/Utils/ScannerTest.php +++ b/tests/lib/Files/Utils/ScannerTest.php @@ -11,7 +11,6 @@ namespace Test\Files\Utils; use OC\Files\Filesystem; use OC\Files\Mount\MountPoint; use OC\Files\Storage\Temporary; -use OCA\Files_Sharing\SharedStorage; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Config\IMountProvider; use OCP\Files\Storage\IStorageFactory;