More params and returns to PHP 7.3+

This commit is contained in:
djmaze 2020-03-16 13:08:53 +01:00
parent 3d246ae842
commit 26c38b3ec9
95 changed files with 1028 additions and 4865 deletions

View file

@ -25,38 +25,26 @@ class AttachmentCollection extends \MailSo\Base\Collection
parent::__construct();
}
/**
* @return \MailSo\Mime\AttachmentCollection
*/
public static function NewInstance()
public static function NewInstance() : \MailSo\Mime\AttachmentCollection
{
return new self();
}
/**
* @return array
*/
public function LinkedAttachments()
public function LinkedAttachments() : array
{
return $this->FilterList(function ($oItem) {
return $oItem && $oItem->IsLinked();
});
}
/**
* @return array
*/
public function UnlinkedAttachments()
public function UnlinkedAttachments() : array
{
return $this->FilterList(function ($oItem) {
return $oItem && !$oItem->IsLinked();
});
}
/**
* @return int
*/
public function SizeOfAttachments()
public function SizeOfAttachments() : int
{
$iResult = 0;
$this->ForeachList(function ($oItem) use (&$iResult) {