mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-13 15:18:41 +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 $filter = '*';
|
||||||
private $nodes = [];
|
private $nodes = [];
|
||||||
|
|
||||||
public static create(string $path, $permission = 0644) : bool
|
public static function create(string $path, $permission = 0644) : bool
|
||||||
{
|
{
|
||||||
if (!file_exists($path)) {
|
if (!file_exists($path)) {
|
||||||
if(is_writable($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
|
public function get(string $name) : FileInterface
|
||||||
{
|
{
|
||||||
return $this->node[$name] ?? new NullFile();
|
return $this->node[$name] ?? new NullFile();
|
||||||
|
|
@ -139,7 +134,7 @@ class Directory extends FileAbstract implements Iterator, ArrayAccess
|
||||||
public function offsetSet(string $offset, FileInterface $value)
|
public function offsetSet(string $offset, FileInterface $value)
|
||||||
{
|
{
|
||||||
if (is_null($offset)) {
|
if (is_null($offset)) {
|
||||||
$this->add($value)
|
$this->add($value);
|
||||||
} else {
|
} else {
|
||||||
$this->node[$offset] = $value;
|
$this->node[$offset] = $value;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ namespace phpOMS\System\File;
|
||||||
class File extends FileAbstract
|
class File extends FileAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
public static create(string $path) : bool
|
public static function create(string $path) : bool
|
||||||
{
|
{
|
||||||
if (!file_exists($path)) {
|
if (!file_exists($path)) {
|
||||||
if(is_writable($path)) {
|
if(is_writable($path)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user