diff options
Diffstat (limited to 'apps/dav/tests/unit/Connector/Sabre')
7 files changed, 19 insertions, 35 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php index 3f134745f86..72d5e7198a3 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CustomPropertiesBackendTest.php @@ -40,7 +40,7 @@ class CustomPropertiesBackendTest extends \Test\TestCase { private $plugin; /** - * @var \OCP\IUser + * @var IUser */ private $user; diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index d659b01d039..7510340aa57 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -23,14 +23,11 @@ use OCP\Files\StorageNotAvailableException; use Test\Traits\UserTrait; class TestViewDirectory extends View { - private $updatables; - private $deletables; - private $canRename; - - public function __construct($updatables, $deletables, $canRename = true) { - $this->updatables = $updatables; - $this->deletables = $deletables; - $this->canRename = $canRename; + public function __construct( + private $updatables, + private $deletables, + private $canRename = true, + ) { } public function isUpdatable($path) { @@ -61,9 +58,9 @@ class TestViewDirectory extends View { class DirectoryTest extends \Test\TestCase { use UserTrait; - /** @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject */ + /** @var View|\PHPUnit\Framework\MockObject\MockObject */ private $view; - /** @var \OC\Files\FileInfo | \PHPUnit\Framework\MockObject\MockObject */ + /** @var FileInfo|\PHPUnit\Framework\MockObject\MockObject */ private $info; protected function setUp(): void { diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php index cf1ea4c6bae..df48cd61114 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Auth.php @@ -13,24 +13,15 @@ use Sabre\HTTP\ResponseInterface; class Auth implements BackendInterface { /** - * @var string - */ - private $user; - - /** - * @var string - */ - private $password; - - /** * Auth constructor. * * @param string $user * @param string $password */ - public function __construct($user, $password) { - $this->user = $user; - $this->password = $password; + public function __construct( + private $user, + private $password, + ) { } /** diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php index 67c2aa61430..4085bc93c78 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTestCase.php @@ -64,7 +64,7 @@ abstract class RequestTestCase extends TestCase { } /** - * @param \OC\Files\View $view the view to run the webdav server against + * @param View $view the view to run the webdav server against * @param string $user * @param string $password * @param string $method diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php index f7bcdd930ca..f12c93468ff 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/Sapi.php @@ -12,11 +12,6 @@ use Sabre\HTTP\Response; class Sapi { /** - * @var \Sabre\HTTP\Request - */ - private $request; - - /** * @var \Sabre\HTTP\Response */ private $response; @@ -31,8 +26,9 @@ class Sapi { return $this->request; } - public function __construct(Request $request) { - $this->request = $request; + public function __construct( + private Request $request, + ) { } /** diff --git a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php index 125fe3959bb..97d3ba79046 100644 --- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php @@ -38,7 +38,7 @@ class SharesPluginTest extends \Test\TestCase { private $shareManager; /** - * @var \OCP\Files\Folder + * @var Folder */ private $userFolder; diff --git a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php index 59fd1e56963..bdab8135b1c 100644 --- a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php @@ -33,12 +33,12 @@ class TagsPluginTest extends \Test\TestCase { private $tree; /** - * @var \OCP\ITagManager + * @var ITagManager */ private $tagManager; /** - * @var \OCP\ITags + * @var ITags */ private $tagger; |