Skip to content

Commit

Permalink
fixed type ambiguity nin Container
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Donat committed Apr 21, 2014
1 parent 4d60640 commit 0d788e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/VirtualFileSystem/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ public function move($from, $to)
$nodeAtToPath = null;
}

if(!$toNode instanceof Directory) {
throw new NotDirectoryException('Destination not a directory');
}

$fromNode->setBasename($newNodeName);

if ($nodeAtToPath instanceof File) {
Expand Down
2 changes: 1 addition & 1 deletion src/VirtualFileSystem/Structure/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function size()
/**
* Returns contents.
*
* @return null
* @return null|string
*/
public function data()
{
Expand Down
1 change: 0 additions & 1 deletion src/VirtualFileSystem/Wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use VirtualFileSystem\Structure\Root;
use VirtualFileSystem\Wrapper\FileHandler;
use VirtualFileSystem\Wrapper\DirectoryHandler;
use VirtualFileSystem\Wrapper\PermissionHelper;

/**
* Stream wrapper class. This is the class that PHP uses as the stream operations handler.
Expand Down

0 comments on commit 0d788e8

Please sign in to comment.