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; protected $name;
/** /**
* @param string $name * @param string $name
* @param NodeContainerInterface $container * @param NodeContainerInterface $container
* @param integer $code * @param integer $code
* @param Exception $previous * @param Exception $previous
*/ */
public function __construct($name, NodeContainerInterface $container, $code = 0, Exception $previous = null) 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; protected $name;
/** /**
* @param string $name * @param string $name
* @param NodeContainerInterface $container * @param NodeContainerInterface $container
* @param integer $code * @param integer $code
* @param Exception $previous * @param Exception $previous
*/ */
public function __construct($name, NodeContainerInterface $container, $code = 0, Exception $previous = null) 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; protected $scheme;
/** /**
* @param string $scheme * @param string $scheme
* @param integer $code * @param integer $code
* @param Exception $previous * @param Exception $previous
*/ */
public function __construct($scheme, $code = 0, Exception $previous = null) 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 HandleInterface $handle
* @param string $url * @param string $url
* @param integer $code * @param integer $code
* @param Exception $previous * @param Exception $previous
*/ */
public function __construct(HandleInterface $handle, $url, $code = 0, Exception $previous = null) 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; protected $scheme;
/** /**
* @param string $scheme * @param string $scheme
* @param integer $code * @param integer $code
* @param Exception $previous * @param Exception $previous
*/ */
public function __construct($scheme, $code = 0, Exception $previous = null) public function __construct($scheme, $code = 0, Exception $previous = null)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,27 +15,27 @@ use Vfs\Exception\UnregisteredSchemeException;
interface RegistryInterface interface RegistryInterface
{ {
/** /**
* @param string $scheme * @param string $scheme
* @param FileSystemInterface $fs * @param FileSystemInterface $fs
* @throws RegisteredSchemeException If a mounted file system exists at scheme * @throws RegisteredSchemeException If a mounted file system exists at scheme
*/ */
public function add($scheme, FileSystemInterface $fs); public function add($scheme, FileSystemInterface $fs);
/** /**
* @param string $scheme * @param string $scheme
* @return FileSystemInterface * @return FileSystemInterface
* @throws UnregisteredSchemeException If a mounted file system doesn't exist at scheme * @throws UnregisteredSchemeException If a mounted file system doesn't exist at scheme
*/ */
public function get($scheme); public function get($scheme);
/** /**
* @param string $scheme * @param string $scheme
* @return boolean * @return boolean
*/ */
public function has($scheme); public function has($scheme);
/** /**
* @param string $scheme * @param string $scheme
* @return FileSystemInterface * @return FileSystemInterface
* @throws UnregisteredSchemeException If a mounted file system doesn't exist at scheme * @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 FileSystemInterface $fs
* @param string $url * @param string $url
* @param string $mode * @param string $mode
*/ */
public function __construct(FileSystemInterface $fs, $url, $mode = null) public function __construct(FileSystemInterface $fs, $url, $mode = null)
{ {
@ -45,8 +45,8 @@ abstract class AbstractHandle implements HandleInterface
} }
/** /**
* @param string $origin * @param string $origin
* @param string $target * @param string $target
* @return NodeInterface * @return NodeInterface
*/ */
public function rename($target) public function rename($target)
@ -80,7 +80,7 @@ abstract class AbstractHandle implements HandleInterface
} }
/** /**
* @param string $mode * @param string $mode
* @return string[] * @return string[]
*/ */
protected function parseMode($mode) protected function parseMode($mode)
@ -89,7 +89,7 @@ abstract class AbstractHandle implements HandleInterface
} }
/** /**
* @param string $url * @param string $url
* @return string[] * @return string[]
*/ */
protected function parseUrl($url) protected function parseUrl($url)
@ -108,7 +108,7 @@ abstract class AbstractHandle implements HandleInterface
/** /**
* @param string $message * @param string $message
* @param array $context * @param array $context
*/ */
protected function warn($message, array $context = []) protected function warn($message, array $context = [])
{ {

View File

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

View File

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

View File

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

View File

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