Skip to content

Commit

Permalink
Merge pull request #41 from thornag/scrutinizer-patch-2
Browse files Browse the repository at this point in the history
Scrutinizer Auto-Fixes
  • Loading branch information
michael-donat committed Dec 30, 2014
2 parents 620ac3f + 9c0cb7d commit 7d802b7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/VirtualFileSystem/FileSystem.php
Expand Up @@ -119,8 +119,8 @@ public function path($path)
/**
* Creates and returns a directory
*
* @param string $path
* @param bool $recursive
* @param string $path
* @param bool $recursive
* @param integer|null $mode
*
* @return Directory
Expand All @@ -133,7 +133,7 @@ public function createDirectory($path, $recursive = false, $mode = null)
/**
* Creates and returns a file
*
* @param string $path
* @param string $path
* @param string|null $data
*
* @return File
Expand Down
33 changes: 28 additions & 5 deletions src/VirtualFileSystem/Wrapper.php
Expand Up @@ -369,9 +369,9 @@ public function mkdir($path, $mode, $options)
}

/**
* @param $path
* @param $container
* @param $strippedPath
* @param string $path
* @param Container $container
* @param string $strippedPath
* @return bool
*/
protected function metaTouch($path, $container, $strippedPath)
Expand Down Expand Up @@ -410,6 +410,13 @@ protected function metaTouch($path, $container, $strippedPath)
return true;
}

/**
* @param Structure\Node $node
* @param integer $value
* @param Container $container
* @param string $strippedPath
* @param Wrapper\PermissionHelper $permissionHelper
*/
protected function metaAccess($node, $value, $container, $strippedPath, $permissionHelper)
{
if ($node instanceof Link) {
Expand All @@ -429,7 +436,15 @@ protected function metaAccess($node, $value, $container, $strippedPath, $permiss
$node->setChangeTime(time());
}

protected function metaOwner($node, $ownerId, $ownerName, $container, $strippedPath, $permissionHelper)
/**
* @param Structure\Node $node
* @param null|integer $ownerId
* @param integer|null $ownerName
* @param Container $container
* @param string $strippedPath
* @param Wrapper\PermissionHelper $permissionHelper
*/
protected function metaOwner($node, $ownerId, $ownerName, $container, $strippedPath, $permissionHelper)
{
if (!$permissionHelper->userIsRoot() && !$permissionHelper->userIsOwner()) {
trigger_error(
Expand All @@ -448,7 +463,15 @@ protected function metaOwner($node, $ownerId, $ownerName, $container, $strippedP
$node->setChangeTime(time());
}

protected function metaGroup($node, $groupId, $groupName, $container, $strippedPath, $permissionHelper)
/**
* @param Structure\Node $node
* @param null|integer $groupId
* @param integer|null $groupName
* @param Container $container
* @param string $strippedPath
* @param Wrapper\PermissionHelper $permissionHelper
*/
protected function metaGroup($node, $groupId, $groupName, $container, $strippedPath, $permissionHelper)
{
if (!$permissionHelper->userIsRoot() && !$permissionHelper->userIsOwner()) {
trigger_error(
Expand Down
2 changes: 1 addition & 1 deletion src/VirtualFileSystem/Wrapper/FileHandler.php
Expand Up @@ -191,7 +191,7 @@ public function isOpenedForReading()
}

/**
* @param $resource
* @param $resource
*/
public function lock($resource, $operation)
{
Expand Down
2 changes: 1 addition & 1 deletion src/VirtualFileSystem/Wrapper/PermissionHelper.php
Expand Up @@ -91,7 +91,7 @@ public function groupIsOwner()
/**
* Checks whether file is readable for group
*
* @return integer|null
* @return boolean
*/
public function groupCanRead()
{
Expand Down

0 comments on commit 7d802b7

Please sign in to comment.