mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 00:47:04 +03:00
More params and returns to PHP 7.3+
This commit is contained in:
parent
3d246ae842
commit
26c38b3ec9
95 changed files with 1028 additions and 4865 deletions
|
|
@ -48,15 +48,9 @@ class Folder
|
|||
private $aExtended;
|
||||
|
||||
/**
|
||||
* @access private
|
||||
*
|
||||
* @param string $sFullNameRaw
|
||||
* @param string $sDelimiter
|
||||
* @param array $aFlags
|
||||
*
|
||||
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
|
||||
*/
|
||||
private function __construct($sFullNameRaw, $sDelimiter, array $aFlags)
|
||||
private function __construct(string $sFullNameRaw, string $sDelimiter, array $aFlags)
|
||||
{
|
||||
$this->sNameRaw = '';
|
||||
$this->sFullNameRaw = '';
|
||||
|
|
@ -104,89 +98,60 @@ class Folder
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $sFullNameRaw
|
||||
* @param string $sDelimiter = '.'
|
||||
* @param array $aFlags = array()
|
||||
*
|
||||
* @return \MailSo\Imap\Folder
|
||||
*
|
||||
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
|
||||
*/
|
||||
public static function NewInstance($sFullNameRaw, $sDelimiter = '.', $aFlags = array())
|
||||
public static function NewInstance(string $sFullNameRaw, string $sDelimiter = '.', array $aFlags = array()) : self
|
||||
{
|
||||
return new self($sFullNameRaw, $sDelimiter, $aFlags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function NameRaw()
|
||||
public function NameRaw() : string
|
||||
{
|
||||
return $this->sNameRaw;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function FullNameRaw()
|
||||
public function FullNameRaw() : string
|
||||
{
|
||||
return $this->sFullNameRaw;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string | null
|
||||
*/
|
||||
public function Delimiter()
|
||||
public function Delimiter() : string
|
||||
{
|
||||
return $this->sDelimiter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function Flags()
|
||||
public function Flags() : array
|
||||
{
|
||||
return $this->aFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function FlagsLowerCase()
|
||||
public function FlagsLowerCase() : array
|
||||
{
|
||||
return $this->aFlagsLowerCase;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function IsSelectable()
|
||||
public function IsSelectable() : bool
|
||||
{
|
||||
return !\in_array('\noselect', $this->aFlagsLowerCase);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function IsInbox()
|
||||
public function IsInbox() : bool
|
||||
{
|
||||
return 'INBOX' === \strtoupper($this->sFullNameRaw) || \in_array('\inbox', $this->aFlagsLowerCase);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
* @param mixed $mData
|
||||
*/
|
||||
public function SetExtended($sName, $mData)
|
||||
public function SetExtended(string $sName, $mData)
|
||||
{
|
||||
$this->aExtended[$sName] = $mData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
* @return mixed
|
||||
*/
|
||||
public function GetExtended($sName)
|
||||
public function GetExtended(string $sName)
|
||||
{
|
||||
return isset($this->aExtended[$sName]) ? $this->aExtended[$sName] : null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue