From 3afa428a31324085e02f529369b6390ee8c3a58a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 27 Mar 2016 13:51:25 +0200 Subject: [PATCH] Fixing typing bugs --- System/File/Directory.php | 9 ++------- System/File/File.php | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/System/File/Directory.php b/System/File/Directory.php index 98296a26e..f96867f38 100644 --- a/System/File/Directory.php +++ b/System/File/Directory.php @@ -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; } diff --git a/System/File/File.php b/System/File/File.php index 8ef920bcc..2bd41e8ff 100644 --- a/System/File/File.php +++ b/System/File/File.php @@ -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)) {