Apply CS fixes

This commit is contained in:
adlawson 2014-09-06 15:15:08 +01:00
parent 00ddcea4aa
commit 346ea57616
20 changed files with 115 additions and 115 deletions

View File

@ -19,10 +19,10 @@ class ExistingNodeException extends OutOfBoundsException implements ExceptionInt
protected $name;
/**
* @param string $name
* @param string $name
* @param NodeContainerInterface $container
* @param integer $code
* @param Exception $previous
* @param integer $code
* @param Exception $previous
*/
public function __construct($name, NodeContainerInterface $container, $code = 0, Exception $previous = null)
{

View File

@ -19,10 +19,10 @@ class MissingNodeException extends OutOfRangeException implements ExceptionInter
protected $name;
/**
* @param string $name
* @param string $name
* @param NodeContainerInterface $container
* @param integer $code
* @param Exception $previous
* @param integer $code
* @param Exception $previous
*/
public function __construct($name, NodeContainerInterface $container, $code = 0, Exception $previous = null)
{

View File

@ -17,8 +17,8 @@ class RegisteredSchemeException extends OutOfBoundsException implements Exceptio
protected $scheme;
/**
* @param string $scheme
* @param integer $code
* @param string $scheme
* @param integer $code
* @param Exception $previous
*/
public function __construct($scheme, $code = 0, Exception $previous = null)

View File

@ -20,9 +20,9 @@ class UnopenedHandleException extends RuntimeException implements ExceptionInter
/**
* @param HandleInterface $handle
* @param string $url
* @param integer $code
* @param Exception $previous
* @param string $url
* @param integer $code
* @param Exception $previous
*/
public function __construct(HandleInterface $handle, $url, $code = 0, Exception $previous = null)
{

View File

@ -17,8 +17,8 @@ class UnregisteredSchemeException extends OutOfRangeException implements Excepti
protected $scheme;
/**
* @param string $scheme
* @param integer $code
* @param string $scheme
* @param integer $code
* @param Exception $previous
*/
public function __construct($scheme, $code = 0, Exception $previous = null)

View File

@ -25,12 +25,12 @@ class FileSystem implements FileSystemInterface
protected $wrapperClass;
/**
* @param string $scheme
* @param string $wrapperClass
* @param string $scheme
* @param string $wrapperClass
* @param NodeFactoryInterface $factory
* @param NodeWalkerInterface $walker
* @param RegistryInterface $registry
* @param LoggerInterface $logger
* @param NodeWalkerInterface $walker
* @param RegistryInterface $registry
* @param LoggerInterface $logger
*/
public function __construct(
$scheme,
@ -51,7 +51,7 @@ class FileSystem implements FileSystemInterface
}
/**
* @param string $scheme
* @param string $scheme
* @return FileSystem
*/
public static function factory($scheme = self::SCHEME)
@ -115,6 +115,7 @@ class FileSystem implements FileSystemInterface
if (stream_wrapper_register($this->scheme, $this->wrapperClass)) {
$this->registry->add($this->scheme, $this);
return true;
}
@ -132,6 +133,7 @@ class FileSystem implements FileSystemInterface
if (stream_wrapper_unregister($this->scheme)) {
$this->registry->remove($this->scheme, $this);
return true;
}
@ -139,7 +141,7 @@ class FileSystem implements FileSystemInterface
}
/**
* @param string $scheme
* @param string $scheme
* @return string
*/
protected function formatScheme($scheme)

View File

@ -66,7 +66,7 @@ class FileSystemBuilder
}
/**
* @param LoggerInterface $logger
* @param LoggerInterface $logger
* @return FileSystemBuilder
*/
public function setLogger(LoggerInterface $logger)
@ -85,7 +85,7 @@ class FileSystemBuilder
}
/**
* @param NodeFactoryInterface $factory
* @param NodeFactoryInterface $factory
* @return FileSystemBuilder
*/
public function setNodeFactory(NodeFactoryInterface $factory)
@ -104,7 +104,7 @@ class FileSystemBuilder
}
/**
* @param NodeWalkerInterface $walker
* @param NodeWalkerInterface $walker
* @return FileSystemBuilder
*/
public function setNodeWalker(NodeWalkerInterface $walker)
@ -123,7 +123,7 @@ class FileSystemBuilder
}
/**
* @param RegistryInterface $registry
* @param RegistryInterface $registry
* @return FileSystemBuilder
*/
public function setRegistry(RegistryInterface $registry)
@ -142,7 +142,7 @@ class FileSystemBuilder
}
/**
* @param string $scheme
* @param string $scheme
* @return FileSystemBuilder
*/
public function setScheme($scheme)
@ -161,7 +161,7 @@ class FileSystemBuilder
}
/**
* @param string $class
* @param string $class
* @return FileSystemBuilder
*/
public function setStreamWrapper($class)
@ -180,7 +180,7 @@ class FileSystemBuilder
}
/**
* @param array $tree
* @param array $tree
* @return FileSystemBuilder
*/
public function setTree($tree)

View File

@ -15,9 +15,9 @@ use Psr\Log\LogLevel;
class PhpErrorLogger extends AbstractLogger
{
/**
* @param mixed $level
* @param mixed $level
* @param string $message
* @param array $context
* @param array $context
*/
public function log($level, $message, array $context = [])
{
@ -40,8 +40,8 @@ class PhpErrorLogger extends AbstractLogger
}
/**
* @param string $message
* @param array $context
* @param string $message
* @param array $context
* @return string
*/
protected function format($message, array $context)
@ -54,7 +54,7 @@ class PhpErrorLogger extends AbstractLogger
}
/**
* @param array $backtrace
* @param array $backtrace
* @return string
*/
protected function formatTrace(array $backtrace)

View File

@ -88,7 +88,7 @@ class Directory implements NodeContainerInterface
}
/**
* @param string $name
* @param string $name
* @param NodeInterface $node
*/
public function set($name, NodeInterface $node)

View File

@ -18,7 +18,7 @@ use Vfs\Node\NodeInterface;
class NodeFactory implements NodeFactoryInterface
{
/**
* @param NodeInterface[] $children
* @param NodeInterface[] $children
* @return NodeContainerInterface
*/
public function buildDirectory(array $children = [])
@ -27,7 +27,7 @@ class NodeFactory implements NodeFactoryInterface
}
/**
* @param string $content
* @param string $content
* @return NodeInterface
*/
public function buildFile($content = '')
@ -36,7 +36,7 @@ class NodeFactory implements NodeFactoryInterface
}
/**
* @param string $content
* @param string $content
* @return NodeInterface
*/
public function buildLink($content = '')
@ -45,7 +45,7 @@ class NodeFactory implements NodeFactoryInterface
}
/**
* @param array $tree
* @param array $tree
* @return NodeContainerInterface
*/
public function buildTree(array $tree)

View File

@ -15,19 +15,19 @@ use Vfs\Node\NodeInterface;
interface NodeFactoryInterface
{
/**
* @param NodeInterface[] $children
* @param NodeInterface[] $children
* @return NodeContainerInterface
*/
public function buildDirectory(array $children = []);
/**
* @param string $content
* @param string $content
* @return NodeInterface
*/
public function buildFile($content = '');
/**
* @param string $content
* @param string $content
* @return NodeInterface
*/
public function buildLink($content = '');

View File

@ -9,7 +9,6 @@
*/
namespace Vfs\Node;
use DateTime;
use IteratorAggregate;
use Vfs\Exception\ExistingNodeException;
use Vfs\Exception\MissingNodeException;
@ -17,32 +16,32 @@ use Vfs\Exception\MissingNodeException;
interface NodeContainerInterface extends NodeInterface, IteratorAggregate
{
/**
* @param string $name
* @param NodeInterface $node
* @param string $name
* @param NodeInterface $node
* @throws ExistingNodeException If a node exists in container with name
*/
public function add($name, NodeInterface $node);
/**
* @param string $name
* @param string $name
* @throws MissingNodeException If a node doesn't exist in container with name
*/
public function get($name);
/**
* @param string $name
* @param string $name
* @return boolean
*/
public function has($name);
/**
* @param string $name
* @param string $name
* @throws MissingNodeException If a node doesn't exist in container with name
*/
public function remove($name);
/**
* @param string $name
* @param string $name
* @param NodeInterface $node
*/
public function set($name, NodeInterface $node);

View File

@ -9,7 +9,6 @@
*/
namespace Vfs\Node\Walker;
use Vfs\Exception\InvalidNodeTypeException;
use Vfs\Node\NodeContainerInterface;
use Vfs\Node\NodeInterface;
@ -26,8 +25,8 @@ class NodeWalker implements NodeWalkerInterface
}
/**
* @param NodeInterface $root
* @param string $path
* @param NodeInterface $root
* @param string $path
* @return NodeInterface
*/
public function findNode(NodeInterface $root, $path)
@ -45,9 +44,9 @@ class NodeWalker implements NodeWalkerInterface
}
/**
* @param NodeInterface $root
* @param string $path
* @param callable $fn
* @param NodeInterface $root
* @param string $path
* @param callable $fn
* @return NodeInterface
*/
public function walkPath(NodeInterface $root, $path, callable $fn)
@ -65,7 +64,7 @@ class NodeWalker implements NodeWalkerInterface
}
/**
* @param string $path
* @param string $path
* @return string[]
*/
protected function splitPath($path)

View File

@ -14,8 +14,8 @@ use Vfs\Node\NodeInterface;
interface NodeWalkerInterface
{
/**
* @param NodeInterface $root
* @param string $path
* @param NodeInterface $root
* @param string $path
* @return NodeInterface
*/
public function findNode(NodeInterface $root, $path);

View File

@ -15,27 +15,27 @@ use Vfs\Exception\UnregisteredSchemeException;
interface RegistryInterface
{
/**
* @param string $scheme
* @param FileSystemInterface $fs
* @param string $scheme
* @param FileSystemInterface $fs
* @throws RegisteredSchemeException If a mounted file system exists at scheme
*/
public function add($scheme, FileSystemInterface $fs);
/**
* @param string $scheme
* @param string $scheme
* @return FileSystemInterface
* @throws UnregisteredSchemeException If a mounted file system doesn't exist at scheme
*/
public function get($scheme);
/**
* @param string $scheme
* @param string $scheme
* @return boolean
*/
public function has($scheme);
/**
* @param string $scheme
* @param string $scheme
* @return FileSystemInterface
* @throws UnregisteredSchemeException If a mounted file system doesn't exist at scheme
*/

View File

@ -24,8 +24,8 @@ abstract class AbstractHandle implements HandleInterface
/**
* @param FileSystemInterface $fs
* @param string $url
* @param string $mode
* @param string $url
* @param string $mode
*/
public function __construct(FileSystemInterface $fs, $url, $mode = null)
{
@ -45,8 +45,8 @@ abstract class AbstractHandle implements HandleInterface
}
/**
* @param string $origin
* @param string $target
* @param string $origin
* @param string $target
* @return NodeInterface
*/
public function rename($target)
@ -80,7 +80,7 @@ abstract class AbstractHandle implements HandleInterface
}
/**
* @param string $mode
* @param string $mode
* @return string[]
*/
protected function parseMode($mode)
@ -89,7 +89,7 @@ abstract class AbstractHandle implements HandleInterface
}
/**
* @param string $url
* @param string $url
* @return string[]
*/
protected function parseUrl($url)
@ -108,7 +108,7 @@ abstract class AbstractHandle implements HandleInterface
/**
* @param string $message
* @param array $context
* @param array $context
*/
protected function warn($message, array $context = [])
{

View File

@ -22,8 +22,8 @@ class DirectoryHandle extends AbstractHandle
}
/**
* @param integer $perms
* @param boolean $recursive
* @param integer $perms
* @param boolean $recursive
* @return NodeInterface
*/
public function create($perms, $recursive = false)
@ -86,7 +86,7 @@ class DirectoryHandle extends AbstractHandle
}
/**
* @param integer $offset
* @param integer $offset
* @return string
*/
public function read($offset = 0)
@ -104,7 +104,7 @@ class DirectoryHandle extends AbstractHandle
}
/**
* @param string $content
* @param string $content
* @return boolean
*/
public function write($content)
@ -113,8 +113,8 @@ class DirectoryHandle extends AbstractHandle
}
/**
* @param NodeContainerInterface $root
* @param string $path
* @param NodeContainerInterface $root
* @param string $path
* @return NodeContainerInterface
*/
protected function buildNodesRecursive(NodeContainerInterface $root, $path)

View File

@ -24,7 +24,7 @@ class FileHandle extends AbstractHandle
}
/**
* @param integer $perms
* @param integer $perms
* @return NodeInterface
*/
public function create($perms)
@ -70,8 +70,8 @@ class FileHandle extends AbstractHandle
}
/**
* @param integer $offset
* @param integer $length
* @param integer $offset
* @param integer $length
* @return string
*/
public function read($offset = 0, $length = null)
@ -90,7 +90,7 @@ class FileHandle extends AbstractHandle
}
/**
* @param string $content
* @param string $content
* @return boolean
*/
public function write($content)

View File

@ -28,7 +28,7 @@ interface HandleInterface
public function canRead();
/**
* @param integer $perms
* @param integer $perms
* @return NodeInterface
*/
public function create($perms);
@ -49,20 +49,20 @@ interface HandleInterface
public function open();
/**
* @param string $origin
* @param string $target
* @param string $origin
* @param string $target
* @return NodeInterface
*/
public function rename($target);
/**
* @param integer $offset
* @param integer $offset
* @return string
*/
public function read($offset = 0);
/**
* @param string $content
* @param string $content
* @return boolean
*/
public function write($content);

View File

@ -30,8 +30,8 @@ class StreamWrapper
}
/**
* @param string $url
* @param integer $options
* @param string $url
* @param integer $options
* @return boolean
*/
public function dir_opendir($url, $options)
@ -60,9 +60,9 @@ class StreamWrapper
}
/**
* @param string $url
* @param integer $perms
* @param integer $flags
* @param string $url
* @param integer $perms
* @param integer $flags
* @return boolean
*/
public function mkdir($url, $perms, $flags)
@ -74,8 +74,8 @@ class StreamWrapper
}
/**
* @param string $origin
* @param string $target
* @param string $origin
* @param string $target
* @return boolean
*/
public function rename($origin, $target)
@ -86,8 +86,8 @@ class StreamWrapper
}
/**
* @param string $url
* @param integer $options
* @param string $url
* @param integer $options
* @return boolean
*/
public function rmdir($url, $options)
@ -98,7 +98,7 @@ class StreamWrapper
}
/**
* @param integer $cast
* @param integer $cast
* @return resource|boolean
*/
public function stream_cast($cast)
@ -133,10 +133,10 @@ class StreamWrapper
}
/**
* @param string $url
* @param string $mode
* @param integer $options
* @param string $openedPath
* @param string $url
* @param string $mode
* @param integer $options
* @param string $openedPath
* @return boolean
*/
public function stream_open($url, $mode, $options, &$openedPath)
@ -157,7 +157,7 @@ class StreamWrapper
}
/**
* @param integer $length
* @param integer $length
* @return string|boolean
*/
public function stream_read($length)
@ -173,8 +173,8 @@ class StreamWrapper
}
/**
* @param integer $offset
* @param integer $whence
* @param integer $offset
* @param integer $whence
* @return boolean
*/
public function stream_seek($offset, $whence = SEEK_SET)
@ -198,9 +198,9 @@ class StreamWrapper
}
/**
* @param integer $option
* @param integer $arg1
* @param integer $arg2
* @param integer $option
* @param integer $arg1
* @param integer $arg2
* @return boolean
*/
public function stream_set_option($option, $arg1, $arg2)
@ -209,7 +209,7 @@ class StreamWrapper
}
/**
* @param boolean $followLink
* @param boolean $followLink
* @return array|boolean
*/
public function stream_stat($followLink = false)
@ -250,7 +250,7 @@ class StreamWrapper
}
/**
* @param integer $size
* @param integer $size
* @return boolean
*/
public function stream_truncate($size)
@ -265,7 +265,7 @@ class StreamWrapper
}
/**
* @param string $data
* @param string $data
* @return integer
*/
public function stream_write($data)
@ -279,7 +279,7 @@ class StreamWrapper
}
/**
* @param string $url
* @param string $url
* @return boolean
*/
public function unlink($url)
@ -290,8 +290,8 @@ class StreamWrapper
}
/**
* @param string $url
* @param integer $flags
* @param string $url
* @param integer $flags
* @return array
*/
public function url_stat($url, $flags)
@ -303,7 +303,7 @@ class StreamWrapper
}
/**
* @param string $url
* @param string $url
* @return DirectoryHandle
*/
protected function buildDirectoryHandle($url)
@ -312,8 +312,8 @@ class StreamWrapper
}
/**
* @param string $url
* @param string $mode
* @param string $url
* @param string $mode
* @return FileHandle
*/
protected function buildFileHandle($url, $mode = null)
@ -322,8 +322,8 @@ class StreamWrapper
}
/**
* @param integer $mask
* @param integer $bit
* @param integer $mask
* @param integer $bit
* @return boolean
*/
protected function checkBit($mask, $bit)
@ -332,7 +332,7 @@ class StreamWrapper
}
/**
* @param string $url
* @param string $url
* @return FileSystemInterface
*/
protected function getFileSystemForUrl($url)