mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-02 21:12:02 +08:00
Bugfix: more function return type errors
This commit is contained in:
parent
2cf35057a5
commit
23e9964997
2 changed files with 8 additions and 9 deletions
|
@ -365,16 +365,16 @@ class ManageSieveClient extends \MailSo\Net\NetClient
|
|||
return $sScriptName === $this->GetActiveScriptName();
|
||||
}
|
||||
|
||||
private function parseLine(string $sLine) : array
|
||||
private function parseLine(string $sLine) : ?array
|
||||
{
|
||||
if (false === $sLine || null === $sLine || \in_array(\substr($sLine, 0, 2), array('OK', 'NO')))
|
||||
{
|
||||
return false;
|
||||
return null;
|
||||
}
|
||||
|
||||
$iStart = -1;
|
||||
$iIndex = 0;
|
||||
$aResult = false;
|
||||
$aResult = array();
|
||||
|
||||
for ($iPos = 0; $iPos < \strlen($sLine); $iPos++)
|
||||
{
|
||||
|
@ -386,14 +386,13 @@ class ManageSieveClient extends \MailSo\Net\NetClient
|
|||
}
|
||||
else
|
||||
{
|
||||
$aResult = \is_array($aResult) ? $aResult : array();
|
||||
$aResult[$iIndex++] = \substr($sLine, $iStart + 1, $iPos - $iStart - 1);
|
||||
$iStart = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return \is_array($aResult) && isset($aResult[0]) ? $aResult : false;
|
||||
return isset($aResult[0]) ? $aResult : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -54,7 +54,7 @@ class Contact
|
|||
$this->Clear();
|
||||
}
|
||||
|
||||
public function Clear()
|
||||
public function Clear() : void
|
||||
{
|
||||
$this->IdContact = '';
|
||||
$this->IdContactStr = '';
|
||||
|
@ -66,7 +66,7 @@ class Contact
|
|||
$this->Etag = '';
|
||||
}
|
||||
|
||||
public function PopulateDisplayAndFullNameValue(bool $bForceFullNameReplace = false)
|
||||
public function PopulateDisplayAndFullNameValue(bool $bForceFullNameReplace = false) : void
|
||||
{
|
||||
$sFullName = '';
|
||||
$sLastName = '';
|
||||
|
@ -151,7 +151,7 @@ class Contact
|
|||
}
|
||||
}
|
||||
|
||||
public function UpdateDependentValues()
|
||||
public function UpdateDependentValues() : void
|
||||
{
|
||||
if (empty($this->IdContactStr))
|
||||
{
|
||||
|
@ -161,7 +161,7 @@ class Contact
|
|||
$this->PopulateDisplayAndFullNameValue();
|
||||
}
|
||||
|
||||
public function RegenerateContactStr() : array
|
||||
public function RegenerateContactStr() : void
|
||||
{
|
||||
$this->IdContactStr = \class_exists('SabreForRainLoop\DAV\Client') ?
|
||||
\SabreForRainLoop\DAV\UUIDUtil::getUUID() : \MailSo\Base\Utils::Md5Rand();
|
||||
|
|
Loading…
Reference in a new issue