Fixing typing bugs

This commit is contained in:
Dennis Eichhorn 2016-03-27 13:51:25 +02:00
parent 5311b12bfb
commit 3afa428a31
2 changed files with 3 additions and 8 deletions

View File

@ -33,7 +33,7 @@ class Directory extends FileAbstract implements Iterator, ArrayAccess
private $filter = '*';
private $nodes = [];
public static create(string $path, $permission = 0644) : bool
public static function create(string $path, $permission = 0644) : bool
{
if (!file_exists($path)) {
if(is_writable($path)) {
@ -58,11 +58,6 @@ class Directory extends FileAbstract implements Iterator, ArrayAccess
}
}
public function create()
{
// todo: implement?
}
public function get(string $name) : FileInterface
{
return $this->node[$name] ?? new NullFile();
@ -139,7 +134,7 @@ class Directory extends FileAbstract implements Iterator, ArrayAccess
public function offsetSet(string $offset, FileInterface $value)
{
if (is_null($offset)) {
$this->add($value)
$this->add($value);
} else {
$this->node[$offset] = $value;
}

View File

@ -31,7 +31,7 @@ namespace phpOMS\System\File;
class File extends FileAbstract
{
public static create(string $path) : bool
public static function create(string $path) : bool
{
if (!file_exists($path)) {
if(is_writable($path)) {