Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add typehine for IRootFolder
Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz authored and backportbot-nextcloud[bot] committed Jun 23, 2023
commit ae48fc86d229e9575f3ca49ad659cd73b31a0c36
12 changes: 5 additions & 7 deletions lib/private/Files/Node/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use OC\Files\Utils\PathHelper;
use OCP\Files\FileInfo;
use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\Lock\LockedException;
Expand All @@ -47,10 +48,7 @@ class Node implements \OCP\Files\Node {
*/
protected $view;

/**
* @var \OC\Files\Node\Root $root
*/
protected $root;
protected IRootFolder $root;

/**
* @var string $path Absolute path to the node (e.g. /admin/files/folder/file)
Expand All @@ -72,7 +70,7 @@ class Node implements \OCP\Files\Node {
* @param string $path
* @param FileInfo $fileInfo
*/
public function __construct($root, $view, $path, $fileInfo = null, ?Node $parent = null, bool $infoHasSubMountsIncluded = true) {
public function __construct(IRootFolder $root, $view, $path, $fileInfo = null, ?Node $parent = null, bool $infoHasSubMountsIncluded = true) {
if (Filesystem::normalizePath($view->getRoot()) !== '/') {
throw new PreConditionNotMetException('The view passed to the node should not have any fake root set');
}
Expand Down Expand Up @@ -402,7 +400,7 @@ public function unlock($type) {

/**
* @param string $targetPath
* @return \OC\Files\Node\Node
* @return \OCP\Files\Node
* @throws InvalidPathException
* @throws NotFoundException
* @throws NotPermittedException if copy not allowed or failed
Expand All @@ -428,7 +426,7 @@ public function copy($targetPath) {

/**
* @param string $targetPath
* @return \OC\Files\Node\Node
* @return \OCP\Files\Node
* @throws InvalidPathException
* @throws NotFoundException
* @throws NotPermittedException if move not allowed or failed
Expand Down