package and depencies

This commit is contained in:
RafficMohammed
2023-01-08 02:57:24 +05:30
parent d5332eb421
commit 1d54b8bc7f
4309 changed files with 193331 additions and 172289 deletions

View File

@@ -26,19 +26,12 @@ class SMimePart extends AbstractPart
private $subtype;
private $parameters;
/**
* @param iterable|string $body
*/
public function __construct($body, string $type, string $subtype, array $parameters)
public function __construct(iterable|string $body, string $type, string $subtype, array $parameters)
{
unset($this->_headers);
parent::__construct();
if (!\is_string($body) && !is_iterable($body)) {
throw new \TypeError(sprintf('The body of "%s" must be a string or a iterable (got "%s").', self::class, get_debug_type($body)));
}
$this->body = $body;
$this->type = $type;
$this->subtype = $subtype;
@@ -114,7 +107,6 @@ class SMimePart extends AbstractPart
public function __wakeup(): void
{
$r = new \ReflectionProperty(AbstractPart::class, 'headers');
$r->setAccessible(true);
$r->setValue($this, $this->_headers);
unset($this->_headers);
}