diff options
author | provokateurin <kate@provokateurin.de> | 2024-10-18 12:04:22 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-10-21 12:37:59 +0200 |
commit | 381077028adf388a7081cf42026570c6be47b198 (patch) | |
tree | c0f8e9b6caea80d6b55d6fdcc9188ba57197fa0f /apps/files/tests | |
parent | 4d8d11d2f79da348644e0902e78a2f000498cd52 (diff) | |
download | nextcloud-server-381077028adf388a7081cf42026570c6be47b198.tar.gz nextcloud-server-381077028adf388a7081cf42026570c6be47b198.zip |
refactor(apps): Use constructor property promotion when possible
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/BackgroundJob/ScanFilesTest.php | 3 | ||||
-rw-r--r-- | apps/files/tests/Controller/ApiControllerTest.php | 4 | ||||
-rw-r--r-- | apps/files/tests/Service/TagServiceTest.php | 7 |
3 files changed, 8 insertions, 6 deletions
diff --git a/apps/files/tests/BackgroundJob/ScanFilesTest.php b/apps/files/tests/BackgroundJob/ScanFilesTest.php index 0fb5163143f..c535ddb808c 100644 --- a/apps/files/tests/BackgroundJob/ScanFilesTest.php +++ b/apps/files/tests/BackgroundJob/ScanFilesTest.php @@ -12,6 +12,7 @@ use OC\Files\Storage\Temporary; use OCA\Files\BackgroundJob\ScanFiles; use OCP\AppFramework\Utility\ITimeFactory; use OCP\EventDispatcher\IEventDispatcher; +use OCP\Files\Config\IUserMountCache; use OCP\IConfig; use OCP\IUser; use Psr\Log\LoggerInterface; @@ -31,7 +32,7 @@ class ScanFilesTest extends TestCase { /** @var ScanFiles */ private $scanFiles; - /** @var \OCP\Files\Config\IUserMountCache */ + /** @var IUserMountCache */ private $mountCache; protected function setUp(): void { diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php index e7f8b962a45..2b1ba34f98e 100644 --- a/apps/files/tests/Controller/ApiControllerTest.php +++ b/apps/files/tests/Controller/ApiControllerTest.php @@ -38,7 +38,7 @@ use Test\TestCase; class ApiControllerTest extends TestCase { /** @var string */ private $appName = 'files'; - /** @var \OCP\IUser */ + /** @var IUser */ private $user; /** @var IRequest */ private $request; @@ -50,7 +50,7 @@ class ApiControllerTest extends TestCase { private $apiController; /** @var \OCP\Share\IManager */ private $shareManager; - /** @var \OCP\IConfig */ + /** @var IConfig */ private $config; /** @var Folder|\PHPUnit\Framework\MockObject\MockObject */ private $userFolder; diff --git a/apps/files/tests/Service/TagServiceTest.php b/apps/files/tests/Service/TagServiceTest.php index 0e3ac66ef38..50c8d586587 100644 --- a/apps/files/tests/Service/TagServiceTest.php +++ b/apps/files/tests/Service/TagServiceTest.php @@ -10,6 +10,7 @@ namespace OCA\Files\Tests\Service; use OCA\Files\Service\TagService; use OCP\Activity\IManager; use OCP\EventDispatcher\IEventDispatcher; +use OCP\Files\Folder; use OCP\Files\NotFoundException; use OCP\ITags; use OCP\IUser; @@ -36,7 +37,7 @@ class TagServiceTest extends \Test\TestCase { private $activityManager; /** - * @var \OCP\Files\Folder + * @var Folder */ private $root; @@ -49,7 +50,7 @@ class TagServiceTest extends \Test\TestCase { private $tagService; /** - * @var \OCP\ITags + * @var ITags */ private $tagger; @@ -62,7 +63,7 @@ class TagServiceTest extends \Test\TestCase { \OC_Util::setupFS($this->user); $user = $this->createMock(IUser::class); /** - * @var \OCP\IUserSession + * @var IUserSession */ $this->userSession = $this->createMock(IUserSession::class); $this->userSession->expects($this->any()) |