summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-05-05 15:33:35 +0200
committerGitHub <noreply@github.com>2017-05-05 15:33:35 +0200
commit57275e99440c38ea0a06e0bc896f68d6178f87b0 (patch)
tree8d73746dd884c479fc694e8ae1d484d85418ef4a
parentee2dfb24e02579e197d391f7937828c836c62f89 (diff)
parent49e958fa120b701e5a5b0f5caf76f671325995e6 (diff)
downloadnextcloud-server-57275e99440c38ea0a06e0bc896f68d6178f87b0.tar.gz
nextcloud-server-57275e99440c38ea0a06e0bc896f68d6178f87b0.zip
Merge pull request #4701 from nextcloud/enforce-type
Enforce type hints in dav app
-rw-r--r--apps/dav/lib/Connector/Sabre/Directory.php4
-rw-r--r--apps/dav/lib/Connector/Sabre/Node.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Directory.php b/apps/dav/lib/Connector/Sabre/Directory.php
index 435f47ee561..cb5a2ab8123 100644
--- a/apps/dav/lib/Connector/Sabre/Directory.php
+++ b/apps/dav/lib/Connector/Sabre/Directory.php
@@ -30,9 +30,11 @@
*/
namespace OCA\DAV\Connector\Sabre;
+use OC\Files\View;
use OCA\DAV\Connector\Sabre\Exception\Forbidden;
use OCA\DAV\Connector\Sabre\Exception\InvalidPath;
use OCA\DAV\Connector\Sabre\Exception\FileLocked;
+use OCP\Files\FileInfo;
use OCP\Files\ForbiddenException;
use OCP\Files\InvalidPathException;
use OCP\Files\StorageNotAvailableException;
@@ -76,7 +78,7 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node
* @param ObjectTree|null $tree
* @param \OCP\Share\IManager $shareManager
*/
- public function __construct($view, $info, $tree = null, $shareManager = null) {
+ public function __construct(View $view, FileInfo $info, $tree = null, $shareManager = null) {
parent::__construct($view, $info, $shareManager);
$this->tree = $tree;
}
diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php
index 3e2204cf661..06933f53e76 100644
--- a/apps/dav/lib/Connector/Sabre/Node.php
+++ b/apps/dav/lib/Connector/Sabre/Node.php
@@ -34,7 +34,9 @@
namespace OCA\DAV\Connector\Sabre;
use OC\Files\Mount\MoveableMount;
+use OC\Files\View;
use OCA\DAV\Connector\Sabre\Exception\InvalidPath;
+use OCP\Files\FileInfo;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
@@ -77,7 +79,7 @@ abstract class Node implements \Sabre\DAV\INode {
* @param \OCP\Files\FileInfo $info
* @param IManager $shareManager
*/
- public function __construct($view, $info, IManager $shareManager = null) {
+ public function __construct(View $view, FileInfo $info, IManager $shareManager = null) {
$this->fileView = $view;
$this->path = $this->fileView->getRelativePath($info->getPath());
$this->info = $info;