mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +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
|
|
@ -17,11 +17,6 @@ namespace MailSo\Mime;
|
|||
*/
|
||||
class ParameterCollection extends \MailSo\Base\Collection
|
||||
{
|
||||
/**
|
||||
* @access protected
|
||||
*
|
||||
* @param string $sRawParams = ''
|
||||
*/
|
||||
protected function __construct($sRawParams = '')
|
||||
{
|
||||
parent::__construct();
|
||||
|
|
@ -32,32 +27,19 @@ class ParameterCollection extends \MailSo\Base\Collection
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sRawParams = ''
|
||||
*
|
||||
* @return \MailSo\Mime\ParameterCollection
|
||||
*/
|
||||
public static function NewInstance($sRawParams = '')
|
||||
public static function NewInstance(string $sRawParams = '') : self
|
||||
{
|
||||
return new self($sRawParams);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \MailSo\Mime\Parameter|null
|
||||
*/
|
||||
public function &GetByIndex($iIndex)
|
||||
public function &GetByIndex(int $iIndex) : ?\MailSo\Mime\Parameter
|
||||
{
|
||||
$mResult = null;
|
||||
$mResult =& parent::GetByIndex($iIndex);
|
||||
return $mResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function ParameterValueByName($sName)
|
||||
public function ParameterValueByName(string $sName) : string
|
||||
{
|
||||
$sResult = '';
|
||||
$sName = \trim($sName);
|
||||
|
|
@ -75,12 +57,7 @@ class ParameterCollection extends \MailSo\Base\Collection
|
|||
return $sResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sRawParams
|
||||
*
|
||||
* @return \MailSo\Mime\ParameterCollection
|
||||
*/
|
||||
public function Parse($sRawParams)
|
||||
public function Parse(string $sRawParams) : self
|
||||
{
|
||||
$this->Clear();
|
||||
|
||||
|
|
@ -96,12 +73,7 @@ class ParameterCollection extends \MailSo\Base\Collection
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $bConvertSpecialsName = false
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function ToString($bConvertSpecialsName = false)
|
||||
public function ToString(bool $bConvertSpecialsName = false) : string
|
||||
{
|
||||
$aResult = array();
|
||||
$aParams =& $this->GetAsArray();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue