mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-09 13:38:41 +00:00
fix phpstan lvl 9 bugs
This commit is contained in:
parent
6e52397ab4
commit
de6831cf36
|
|
@ -355,6 +355,10 @@ class Directory extends FileAbstract implements DirectoryInterface
|
||||||
*/
|
*/
|
||||||
public function getOwner() : string
|
public function getOwner() : string
|
||||||
{
|
{
|
||||||
|
if ($this->con === null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
$this->owner = self::parseRawList($this->con, self::parent($this->path))[$this->path]['user'];
|
$this->owner = self::parseRawList($this->con, self::parent($this->path))[$this->path]['user'];
|
||||||
|
|
||||||
return $this->owner;
|
return $this->owner;
|
||||||
|
|
@ -425,6 +429,10 @@ class Directory extends FileAbstract implements DirectoryInterface
|
||||||
*/
|
*/
|
||||||
public function getPermission() : int
|
public function getPermission() : int
|
||||||
{
|
{
|
||||||
|
if ($this->con === null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
$this->permission = self::parseRawList($this->con, self::parent($this->path))[$this->path]['permission'];
|
$this->permission = self::parseRawList($this->con, self::parent($this->path))[$this->path]['permission'];
|
||||||
|
|
||||||
return $this->permission;
|
return $this->permission;
|
||||||
|
|
|
||||||
|
|
@ -302,6 +302,10 @@ class File extends FileAbstract implements FileInterface
|
||||||
*/
|
*/
|
||||||
public function getOwner() : string
|
public function getOwner() : string
|
||||||
{
|
{
|
||||||
|
if ($this->con === null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
$this->owner = Directory::parseRawList($this->con, self::dirpath($this->path))[$this->path]['user'];
|
$this->owner = Directory::parseRawList($this->con, self::dirpath($this->path))[$this->path]['user'];
|
||||||
|
|
||||||
return $this->owner;
|
return $this->owner;
|
||||||
|
|
@ -324,6 +328,10 @@ class File extends FileAbstract implements FileInterface
|
||||||
*/
|
*/
|
||||||
public function getPermission() : int
|
public function getPermission() : int
|
||||||
{
|
{
|
||||||
|
if ($this->con === null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
$this->permission = Directory::parseRawList($this->con, self::dirpath($this->path))[$this->path]['permission'];
|
$this->permission = Directory::parseRawList($this->con, self::dirpath($this->path))[$this->path]['permission'];
|
||||||
|
|
||||||
return $this->permission;
|
return $this->permission;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user