mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-24 07:08:40 +00:00
Bug fixes.
This commit is contained in:
parent
cfe6fb0059
commit
8ebdf58d34
|
|
@ -96,7 +96,7 @@ abstract class Enum
|
|||
{
|
||||
$constants = self::getConstants();
|
||||
|
||||
return $this->constants[mt_rand(0, count($constants))];
|
||||
return $constants[mt_rand(0, count($constants))];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class ModuleManager
|
|||
/**
|
||||
* All modules that are running on this uri.
|
||||
*
|
||||
* @var \phpOMS\Module\ModuleAbstract
|
||||
* @var \phpOMS\Module\ModuleAbstract[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $running = [];
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ class PriorityQueue implements \Countable, \Serializable
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function unserialize(array $data) : array
|
||||
public function unserialize($data) : array
|
||||
{
|
||||
$this->queue = json_decode($data);
|
||||
$this->count = count($this->queue);
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class Directory extends FileAbstract implements \Iterator, \ArrayAccess
|
|||
|
||||
public function get(string $name) : FileAbstract
|
||||
{
|
||||
return $this->node[$name] ?? new NullFile();
|
||||
return $this->nodes[$name] ?? new NullFile();
|
||||
}
|
||||
|
||||
public function add(FileAbstract $file)
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ namespace phpOMS\System\File;
|
|||
*/
|
||||
abstract class FileAbstract
|
||||
{
|
||||
private $path = '';
|
||||
private $name = 'new_directory';
|
||||
private $count = 0;
|
||||
private $size = 0;
|
||||
protected $path = '';
|
||||
protected $name = 'new_directory';
|
||||
protected $count = 0;
|
||||
protected $size = 0;
|
||||
private $createdAt = null;
|
||||
private $changedAt = null;
|
||||
private $owner = 0;
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ class Http implements UriInterface
|
|||
*/
|
||||
public function getAuthority() : string
|
||||
{
|
||||
return ($this->getUser() !== '' ? $this->getUser() . '@' : '') . $this->host . (isset($this->port) && $this->port !== '' ? ':' . $this->port : '');
|
||||
return ($this->getUser() !== '' ? $this->getUser() . '@' : '') . $this->host . (isset($this->port) && $this->port !== 0 ? ':' . $this->port : '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -261,13 +261,13 @@ class MultiMap implements \Countable
|
|||
if($this->orderType !== OrderType::LOOSE) {
|
||||
$permutation = Permutation::permut($key);
|
||||
|
||||
foreach($permuation as $permut) {
|
||||
foreach($permutation as $permut) {
|
||||
if($this->set(implode($permut, ':'), $value)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return $this->set(implode($key, ':'));
|
||||
return $this->set(implode($key, ':'), $value);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class ArrayRandomize
|
|||
for($i = count($arr)-1; $i > 0; $i--){
|
||||
$rnd = mt_rand(0, $i);
|
||||
$shuffled[$i] = $arr[$rnd];
|
||||
$shuffled[$rand] = $arr[$i];
|
||||
$shuffled[$rnd] = $arr[$i];
|
||||
}
|
||||
|
||||
return $shuffled;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user