mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Fixing typing bugs
This commit is contained in:
parent
5311b12bfb
commit
3afa428a31
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user