Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
MailMimePartDto
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5/** @license For full copyright and license information, please see the LICENSE.md file. */
6
7namespace App\Modules\Mail\Domain\Model;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11/**
12 * Mail MIME Part Data Transfer Object.
13 *
14 * Encapsulates raw content stream and metadata for an individual MIME body or attachment part.
15 *
16 * @package App\Modules\Mail\Domain\Model
17 */
18final readonly class MailMimePartDto
19{
20    /**
21     * MailMimePartDto constructor.
22     *
23     * @param string      $partId   MIME part identifier.
24     * @param string      $mimeType Content type (e.g. application/pdf, text/html).
25     * @param string      $content  Binary or decoded content payload.
26     * @param int         $size     Payload size in bytes.
27     * @param string|null $filename Suggested download filename if attachment.
28     */
29    public function __construct(
30        public string $partId,
31        public string $mimeType,
32        public string $content,
33        public int $size,
34        public ?string $filename = null
35    ) {
36    }
37}