Remove unnecessary `@inheritdoc` docblocks

They're not needed to inherit parent documentation and are overly all up
in my grill.
This commit is contained in:
adlawson 2015-07-21 15:09:37 +01:00
parent 30e428df47
commit feaf925bec
12 changed files with 14 additions and 189 deletions

View File

@ -61,49 +61,31 @@ class FileSystem implements FileSystemInterface
return $builder->build(); return $builder->build();
} }
/**
* {@inheritdoc}
*/
public function get($path) public function get($path)
{ {
return $this->walker->findNode($this->root, $path); return $this->walker->findNode($this->root, $path);
} }
/**
* {@inheritdoc}
*/
public function getLogger() public function getLogger()
{ {
return $this->logger; return $this->logger;
} }
/**
* {@inheritdoc}
*/
public function getNodeFactory() public function getNodeFactory()
{ {
return $this->factory; return $this->factory;
} }
/**
* {@inheritdoc}
*/
public function getNodeWalker() public function getNodeWalker()
{ {
return $this->walker; return $this->walker;
} }
/**
* @return string
*/
public function getScheme() public function getScheme()
{ {
return $this->scheme; return $this->scheme;
} }
/**
* {@inheritdoc}
*/
public function mount() public function mount()
{ {
if ($this->registry->has($this->scheme) || in_array($this->scheme, stream_get_wrappers())) { if ($this->registry->has($this->scheme) || in_array($this->scheme, stream_get_wrappers())) {
@ -119,9 +101,6 @@ class FileSystem implements FileSystemInterface
return false; return false;
} }
/**
* {@inheritdoc}
*/
public function unmount() public function unmount()
{ {
if (!$this->registry->has($this->scheme) && !in_array($this->scheme, stream_get_wrappers())) { if (!$this->registry->has($this->scheme) && !in_array($this->scheme, stream_get_wrappers())) {

View File

@ -39,9 +39,6 @@ class FileSystemRegistry implements RegistryInterface
return self::$instance; return self::$instance;
} }
/**
* {@inheritdoc}
*/
public function add($scheme, FileSystemInterface $fs) public function add($scheme, FileSystemInterface $fs)
{ {
if ($this->has($scheme)) { if ($this->has($scheme)) {
@ -51,9 +48,6 @@ class FileSystemRegistry implements RegistryInterface
$this->registered[$scheme] = $fs; $this->registered[$scheme] = $fs;
} }
/**
* {@inheritdoc}
*/
public function get($scheme) public function get($scheme)
{ {
if (!$this->has($scheme)) { if (!$this->has($scheme)) {
@ -63,17 +57,11 @@ class FileSystemRegistry implements RegistryInterface
return $this->registered[$scheme]; return $this->registered[$scheme];
} }
/**
* {@inheritdoc}
*/
public function has($scheme) public function has($scheme)
{ {
return isset($this->registered[$scheme]); return isset($this->registered[$scheme]);
} }
/**
* {@inheritdoc}
*/
public function remove($scheme) public function remove($scheme)
{ {
if (!$this->has($scheme)) { if (!$this->has($scheme)) {

View File

@ -14,11 +14,6 @@ use Psr\Log\LogLevel;
class PhpErrorLogger extends AbstractLogger class PhpErrorLogger extends AbstractLogger
{ {
/**
* @param mixed $level
* @param string $message
* @param array $context
*/
public function log($level, $message, array $context = []) public function log($level, $message, array $context = [])
{ {
switch ($level) { switch ($level) {

View File

@ -43,9 +43,6 @@ class Directory implements NodeContainerInterface
$this->set(self::DOT_SELF, $this); $this->set(self::DOT_SELF, $this);
} }
/**
* {@inheritdoc}
*/
public function add($name, NodeInterface $node) public function add($name, NodeInterface $node)
{ {
if ($this->has($name)) { if ($this->has($name)) {
@ -55,9 +52,6 @@ class Directory implements NodeContainerInterface
$this->set($name, $node); $this->set($name, $node);
} }
/**
* {@inheritdoc}
*/
public function get($name) public function get($name)
{ {
if (!$this->has($name)) { if (!$this->has($name)) {
@ -67,17 +61,11 @@ class Directory implements NodeContainerInterface
return $this->nodes[$name]; return $this->nodes[$name];
} }
/**
* {@inheritdoc}
*/
public function has($name) public function has($name)
{ {
return isset($this->nodes[$name]); return isset($this->nodes[$name]);
} }
/**
* {@inheritdoc}
*/
public function remove($name) public function remove($name)
{ {
if (!$this->has($name)) { if (!$this->has($name)) {
@ -87,10 +75,6 @@ class Directory implements NodeContainerInterface
unset($this->nodes[$name]); unset($this->nodes[$name]);
} }
/**
* @param string $name
* @param NodeInterface $node
*/
public function set($name, NodeInterface $node) public function set($name, NodeInterface $node)
{ {
$this->nodes[$name] = $node; $this->nodes[$name] = $node;
@ -100,65 +84,41 @@ class Directory implements NodeContainerInterface
} }
} }
/**
* {@inheritdoc}
*/
public function getDateAccessed() public function getDateAccessed()
{ {
return $this->dateAccessed; return $this->dateAccessed;
} }
/**
* @param DateTime $dateTime
*/
public function setDateAccessed(DateTime $dateTime) public function setDateAccessed(DateTime $dateTime)
{ {
$this->dateAccessed = $dateTime; $this->dateAccessed = $dateTime;
} }
/**
* {@inheritdoc}
*/
public function getDateCreated() public function getDateCreated()
{ {
return $this->dateCreated; return $this->dateCreated;
} }
/**
* {@inheritdoc}
*/
public function getDateModified() public function getDateModified()
{ {
return $this->dateModified; return $this->dateModified;
} }
/**
* @param DateTime $dateTime
*/
public function setDateModified(DateTime $dateTime) public function setDateModified(DateTime $dateTime)
{ {
$this->dateModified = $dateTime; $this->dateModified = $dateTime;
} }
/**
* {@inheritdoc}
*/
public function getIterator() public function getIterator()
{ {
return new ArrayIterator($this->nodes); return new ArrayIterator($this->nodes);
} }
/**
* {@inheritdoc}
*/
public function getMode() public function getMode()
{ {
return $this->mode; return $this->mode;
} }
/**
* {@inheritdoc}
*/
public function getSize() public function getSize()
{ {
$size = 0; $size = 0;

View File

@ -17,37 +17,21 @@ use Vfs\Node\NodeInterface;
class NodeFactory implements NodeFactoryInterface class NodeFactory implements NodeFactoryInterface
{ {
/**
* @param NodeInterface[] $children
* @return NodeContainerInterface
*/
public function buildDirectory(array $children = []) public function buildDirectory(array $children = [])
{ {
return new Directory($children); return new Directory($children);
} }
/**
* @param string $content
* @return NodeInterface
*/
public function buildFile($content = '') public function buildFile($content = '')
{ {
return new File($content); return new File($content);
} }
/**
* @param string $content
* @return NodeInterface
*/
public function buildLink($content = '') public function buildLink($content = '')
{ {
throw new LogicException('Symlinks aren\'t supported yet.'); throw new LogicException('Symlinks aren\'t supported yet.');
} }
/**
* @param array $tree
* @return NodeContainerInterface
*/
public function buildTree(array $tree) public function buildTree(array $tree)
{ {
$nodes = []; $nodes = [];

View File

@ -31,4 +31,10 @@ interface NodeFactoryInterface
* @return NodeInterface * @return NodeInterface
*/ */
public function buildLink($content = ''); public function buildLink($content = '');
/**
* @param array $tree
* @return NodeContainerInterface
*/
public function buildTree(array $tree);
} }

View File

@ -32,73 +32,46 @@ class File implements FileInterface
$this->dateModified = clone $this->dateAccessed; $this->dateModified = clone $this->dateAccessed;
} }
/**
* {@inheritdoc}
*/
public function getContent() public function getContent()
{ {
return $this->content; return $this->content;
} }
/**
* {@inheritdoc}
*/
public function setContent($content) public function setContent($content)
{ {
$this->content = (string) $content; $this->content = (string) $content;
} }
/**
* {@inheritdoc}
*/
public function getDateAccessed() public function getDateAccessed()
{ {
return $this->dateAccessed; return $this->dateAccessed;
} }
/**
* @param DateTime $dateTime
*/
public function setDateAccessed(DateTime $dateTime) public function setDateAccessed(DateTime $dateTime)
{ {
$this->dateAccessed = $dateTime; $this->dateAccessed = $dateTime;
} }
/**
* {@inheritdoc}
*/
public function getDateCreated() public function getDateCreated()
{ {
return $this->dateCreated; return $this->dateCreated;
} }
/**
* {@inheritdoc}
*/
public function getDateModified() public function getDateModified()
{ {
return $this->dateModified; return $this->dateModified;
} }
/**
* @param DateTime $dateTime
*/
public function setDateModified(DateTime $dateTime) public function setDateModified(DateTime $dateTime)
{ {
$this->dateModified = $dateTime; $this->dateModified = $dateTime;
} }
/**
* {@inheritdoc}
*/
public function getMode() public function getMode()
{ {
return $this->mode; return $this->mode;
} }
/**
* {@inheritdoc}
*/
public function getSize() public function getSize()
{ {
return strlen($this->content); return strlen($this->content);

View File

@ -24,11 +24,6 @@ class NodeWalker implements NodeWalkerInterface
$this->separator = $separator; $this->separator = $separator;
} }
/**
* @param NodeInterface $root
* @param string $path
* @return NodeInterface
*/
public function findNode(NodeInterface $root, $path) public function findNode(NodeInterface $root, $path)
{ {
$parts = $this->splitPath($path); $parts = $this->splitPath($path);
@ -43,12 +38,6 @@ class NodeWalker implements NodeWalkerInterface
}); });
} }
/**
* @param NodeInterface $root
* @param string $path
* @param callable $fn
* @return NodeInterface
*/
public function walkPath(NodeInterface $root, $path, callable $fn) public function walkPath(NodeInterface $root, $path, callable $fn)
{ {
$parts = $this->splitPath($path); $parts = $this->splitPath($path);

View File

@ -19,4 +19,12 @@ interface NodeWalkerInterface
* @return NodeInterface * @return NodeInterface
*/ */
public function findNode(NodeInterface $root, $path); public function findNode(NodeInterface $root, $path);
/**
* @param NodeInterface $root
* @param string $path
* @param callable $fn
* @return NodeInterface
*/
public function walkPath(NodeInterface $root, $path, callable $fn);
} }

View File

@ -36,19 +36,11 @@ abstract class AbstractHandle implements HandleInterface
list($this->scheme, $this->path) = $this->parseUrl($url); list($this->scheme, $this->path) = $this->parseUrl($url);
} }
/**
* @return NodeInterface
*/
public function getNode() public function getNode()
{ {
return $this->node; return $this->node;
} }
/**
* @param string $origin
* @param string $target
* @return NodeInterface
*/
public function rename($target) public function rename($target)
{ {
$this->node = $this->findNode($this->path); $this->node = $this->findNode($this->path);

View File

@ -14,19 +14,11 @@ use Vfs\Exception\UnopenedHandleException;
class DirectoryHandle extends AbstractHandle class DirectoryHandle extends AbstractHandle
{ {
/**
* @return boolean
*/
public function canRead() public function canRead()
{ {
return true; return true;
} }
/**
* @param integer $perms
* @param boolean $recursive
* @return NodeInterface
*/
public function create($perms, $recursive = false) public function create($perms, $recursive = false)
{ {
$this->node = $this->findNode(); $this->node = $this->findNode();
@ -55,9 +47,6 @@ class DirectoryHandle extends AbstractHandle
return $this->node; return $this->node;
} }
/**
* @return boolean
*/
public function destroy() public function destroy()
{ {
$this->node = $this->findNode(); $this->node = $this->findNode();
@ -78,18 +67,11 @@ class DirectoryHandle extends AbstractHandle
return true; return true;
} }
/**
* @return NodeInterface
*/
public function open() public function open()
{ {
return $this->node = $this->findNode(); return $this->node = $this->findNode();
} }
/**
* @param integer $offset
* @return string
*/
public function read($offset = 0) public function read($offset = 0)
{ {
if (!$this->node) { if (!$this->node) {
@ -104,10 +86,6 @@ class DirectoryHandle extends AbstractHandle
} }
} }
/**
* @param string $content
* @return boolean
*/
public function write($content) public function write($content)
{ {
return false; return false;

View File

@ -16,26 +16,16 @@ use Vfs\Node\NodeContainerInterface;
class FileHandle extends AbstractHandle class FileHandle extends AbstractHandle
{ {
/**
* @return boolean
*/
public function canRead() public function canRead()
{ {
return self::MODE_READ === $this->mode || self::MOD_EXTENDED === $this->modifier; return self::MODE_READ === $this->mode || self::MOD_EXTENDED === $this->modifier;
} }
/**
* @param integer $perms
* @return NodeInterface
*/
public function create($perms) public function create($perms)
{ {
return $this->node = $this->findOrBuildNode(); return $this->node = $this->findOrBuildNode();
} }
/**
* @return boolean
*/
public function destroy() public function destroy()
{ {
$this->node = $this->findNode(); $this->node = $this->findNode();
@ -56,9 +46,6 @@ class FileHandle extends AbstractHandle
return true; return true;
} }
/**
* @return NodeInterface
*/
public function open() public function open()
{ {
$this->node = $this->findOrBuildNode(); $this->node = $this->findOrBuildNode();
@ -70,11 +57,6 @@ class FileHandle extends AbstractHandle
return $this->node; return $this->node;
} }
/**
* @param integer $offset
* @param integer $length
* @return string
*/
public function read($offset = 0, $length = null) public function read($offset = 0, $length = null)
{ {
if (!$this->node) { if (!$this->node) {
@ -90,11 +72,6 @@ class FileHandle extends AbstractHandle
return substr($this->node->getContent(), $offset); return substr($this->node->getContent(), $offset);
} }
/**
* @param DateTime $mtime
* @param DateTime $atime
* @return NodeInterface
*/
public function touch(DateTime $mtime = null, DateTime $atime = null) public function touch(DateTime $mtime = null, DateTime $atime = null)
{ {
$node = $this->findOrBuildNode(); $node = $this->findOrBuildNode();
@ -112,10 +89,6 @@ class FileHandle extends AbstractHandle
return $node; return $node;
} }
/**
* @param string $content
* @return boolean
*/
public function write($content) public function write($content)
{ {
if (!$this->node) { if (!$this->node) {