瀏覽代碼

Enforce type hints in dav app

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
tags/v12.0.0beta2
Morris Jobke 7 年之前
父節點
當前提交
49e958fa12
共有 2 個檔案被更改,包括 6 行新增2 行删除
  1. 3
    1
      apps/dav/lib/Connector/Sabre/Directory.php
  2. 3
    1
      apps/dav/lib/Connector/Sabre/Node.php

+ 3
- 1
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;
}

+ 3
- 1
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;

Loading…
取消
儲存