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();
}
/**
* {@inheritdoc}
*/
public function get($path)
{
return $this->walker->findNode($this->root, $path);
}
/**
* {@inheritdoc}
*/
public function getLogger()
{
return $this->logger;
}
/**
* {@inheritdoc}
*/
public function getNodeFactory()
{
return $this->factory;
}
/**
* {@inheritdoc}
*/
public function getNodeWalker()
{
return $this->walker;
}
/**
* @return string
*/
public function getScheme()
{
return $this->scheme;
}
/**
* {@inheritdoc}
*/
public function mount()
{
if ($this->registry->has($this->scheme) || in_array($this->scheme, stream_get_wrappers())) {
@ -119,9 +101,6 @@ class FileSystem implements FileSystemInterface
return false;
}
/**
* {@inheritdoc}
*/
public function unmount()
{
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;
}
/**
* {@inheritdoc}
*/
public function add($scheme, FileSystemInterface $fs)
{
if ($this->has($scheme)) {
@ -51,9 +48,6 @@ class FileSystemRegistry implements RegistryInterface
$this->registered[$scheme] = $fs;
}
/**
* {@inheritdoc}
*/
public function get($scheme)
{
if (!$this->has($scheme)) {
@ -63,17 +57,11 @@ class FileSystemRegistry implements RegistryInterface
return $this->registered[$scheme];
}
/**
* {@inheritdoc}
*/
public function has($scheme)
{
return isset($this->registered[$scheme]);
}
/**
* {@inheritdoc}
*/
public function remove($scheme)
{
if (!$this->has($scheme)) {

View File

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

View File

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

View File

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

View File

@ -31,4 +31,10 @@ interface NodeFactoryInterface
* @return NodeInterface
*/
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;
}
/**
* {@inheritdoc}
*/
public function getContent()
{
return $this->content;
}
/**
* {@inheritdoc}
*/
public function setContent($content)
{
$this->content = (string) $content;
}
/**
* {@inheritdoc}
*/
public function getDateAccessed()
{
return $this->dateAccessed;
}
/**
* @param DateTime $dateTime
*/
public function setDateAccessed(DateTime $dateTime)
{
$this->dateAccessed = $dateTime;
}
/**
* {@inheritdoc}
*/
public function getDateCreated()
{
return $this->dateCreated;
}
/**
* {@inheritdoc}
*/
public function getDateModified()
{
return $this->dateModified;
}
/**
* @param DateTime $dateTime
*/
public function setDateModified(DateTime $dateTime)
{
$this->dateModified = $dateTime;
}
/**
* {@inheritdoc}
*/
public function getMode()
{
return $this->mode;
}
/**
* {@inheritdoc}
*/
public function getSize()
{
return strlen($this->content);

View File

@ -24,11 +24,6 @@ class NodeWalker implements NodeWalkerInterface
$this->separator = $separator;
}
/**
* @param NodeInterface $root
* @param string $path
* @return NodeInterface
*/
public function findNode(NodeInterface $root, $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)
{
$parts = $this->splitPath($path);

View File

@ -19,4 +19,12 @@ interface NodeWalkerInterface
* @return NodeInterface
*/
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);
}
/**
* @return NodeInterface
*/
public function getNode()
{
return $this->node;
}
/**
* @param string $origin
* @param string $target
* @return NodeInterface
*/
public function rename($target)
{
$this->node = $this->findNode($this->path);

View File

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

View File

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