From 346ea57616ebd352695246d52720bd0c629232fd Mon Sep 17 00:00:00 2001 From: adlawson Date: Sat, 6 Sep 2014 15:15:08 +0100 Subject: [PATCH] Apply CS fixes --- src/Exception/ExistingNodeException.php | 6 +- src/Exception/MissingNodeException.php | 6 +- src/Exception/RegisteredSchemeException.php | 4 +- src/Exception/UnopenedHandleException.php | 6 +- src/Exception/UnregisteredSchemeException.php | 4 +- src/FileSystem.php | 16 +++-- src/FileSystemBuilder.php | 14 ++-- src/Logger/PhpErrorLogger.php | 10 +-- src/Node/Directory.php | 2 +- src/Node/Factory/NodeFactory.php | 8 +-- src/Node/Factory/NodeFactoryInterface.php | 6 +- src/Node/NodeContainerInterface.php | 13 ++-- src/Node/Walker/NodeWalker.php | 13 ++-- src/Node/Walker/NodeWalkerInterface.php | 4 +- src/RegistryInterface.php | 10 +-- src/Stream/AbstractHandle.php | 14 ++-- src/Stream/DirectoryHandle.php | 12 ++-- src/Stream/FileHandle.php | 8 +-- src/Stream/HandleInterface.php | 10 +-- src/Stream/StreamWrapper.php | 64 +++++++++---------- 20 files changed, 115 insertions(+), 115 deletions(-) diff --git a/src/Exception/ExistingNodeException.php b/src/Exception/ExistingNodeException.php index 890e66b..ff5724f 100644 --- a/src/Exception/ExistingNodeException.php +++ b/src/Exception/ExistingNodeException.php @@ -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) { diff --git a/src/Exception/MissingNodeException.php b/src/Exception/MissingNodeException.php index 7d342cd..cd65aae 100644 --- a/src/Exception/MissingNodeException.php +++ b/src/Exception/MissingNodeException.php @@ -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) { diff --git a/src/Exception/RegisteredSchemeException.php b/src/Exception/RegisteredSchemeException.php index 2246509..fa320ad 100644 --- a/src/Exception/RegisteredSchemeException.php +++ b/src/Exception/RegisteredSchemeException.php @@ -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) diff --git a/src/Exception/UnopenedHandleException.php b/src/Exception/UnopenedHandleException.php index 59b5c8a..73f412d 100644 --- a/src/Exception/UnopenedHandleException.php +++ b/src/Exception/UnopenedHandleException.php @@ -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) { diff --git a/src/Exception/UnregisteredSchemeException.php b/src/Exception/UnregisteredSchemeException.php index 7c8d097..9ee6663 100644 --- a/src/Exception/UnregisteredSchemeException.php +++ b/src/Exception/UnregisteredSchemeException.php @@ -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) diff --git a/src/FileSystem.php b/src/FileSystem.php index eb95e09..b1a3578 100644 --- a/src/FileSystem.php +++ b/src/FileSystem.php @@ -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) diff --git a/src/FileSystemBuilder.php b/src/FileSystemBuilder.php index 8ecea02..b3a0cc1 100644 --- a/src/FileSystemBuilder.php +++ b/src/FileSystemBuilder.php @@ -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) diff --git a/src/Logger/PhpErrorLogger.php b/src/Logger/PhpErrorLogger.php index f63346a..a0a977e 100644 --- a/src/Logger/PhpErrorLogger.php +++ b/src/Logger/PhpErrorLogger.php @@ -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) diff --git a/src/Node/Directory.php b/src/Node/Directory.php index 0953433..57ba7ef 100644 --- a/src/Node/Directory.php +++ b/src/Node/Directory.php @@ -88,7 +88,7 @@ class Directory implements NodeContainerInterface } /** - * @param string $name + * @param string $name * @param NodeInterface $node */ public function set($name, NodeInterface $node) diff --git a/src/Node/Factory/NodeFactory.php b/src/Node/Factory/NodeFactory.php index 26a5a5d..3b15a43 100644 --- a/src/Node/Factory/NodeFactory.php +++ b/src/Node/Factory/NodeFactory.php @@ -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) diff --git a/src/Node/Factory/NodeFactoryInterface.php b/src/Node/Factory/NodeFactoryInterface.php index a74ac99..ca2ffca 100644 --- a/src/Node/Factory/NodeFactoryInterface.php +++ b/src/Node/Factory/NodeFactoryInterface.php @@ -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 = ''); diff --git a/src/Node/NodeContainerInterface.php b/src/Node/NodeContainerInterface.php index 584ea98..243780f 100644 --- a/src/Node/NodeContainerInterface.php +++ b/src/Node/NodeContainerInterface.php @@ -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); diff --git a/src/Node/Walker/NodeWalker.php b/src/Node/Walker/NodeWalker.php index 7434613..b220efd 100644 --- a/src/Node/Walker/NodeWalker.php +++ b/src/Node/Walker/NodeWalker.php @@ -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) diff --git a/src/Node/Walker/NodeWalkerInterface.php b/src/Node/Walker/NodeWalkerInterface.php index a67cfce..9f86e07 100644 --- a/src/Node/Walker/NodeWalkerInterface.php +++ b/src/Node/Walker/NodeWalkerInterface.php @@ -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); diff --git a/src/RegistryInterface.php b/src/RegistryInterface.php index 8ca4a35..984e741 100644 --- a/src/RegistryInterface.php +++ b/src/RegistryInterface.php @@ -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 */ diff --git a/src/Stream/AbstractHandle.php b/src/Stream/AbstractHandle.php index 129bd62..327e4ac 100644 --- a/src/Stream/AbstractHandle.php +++ b/src/Stream/AbstractHandle.php @@ -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 = []) { diff --git a/src/Stream/DirectoryHandle.php b/src/Stream/DirectoryHandle.php index 79664de..bfdd3d0 100644 --- a/src/Stream/DirectoryHandle.php +++ b/src/Stream/DirectoryHandle.php @@ -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) diff --git a/src/Stream/FileHandle.php b/src/Stream/FileHandle.php index 11b33a3..c3d739f 100644 --- a/src/Stream/FileHandle.php +++ b/src/Stream/FileHandle.php @@ -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) diff --git a/src/Stream/HandleInterface.php b/src/Stream/HandleInterface.php index 36d2328..c86e06e 100644 --- a/src/Stream/HandleInterface.php +++ b/src/Stream/HandleInterface.php @@ -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); diff --git a/src/Stream/StreamWrapper.php b/src/Stream/StreamWrapper.php index e40697b..22c62c4 100644 --- a/src/Stream/StreamWrapper.php +++ b/src/Stream/StreamWrapper.php @@ -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)