Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| CreateCommentDto | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Modules\Comments\Application\DTO; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | /** |
| 12 | * Data transfer object for creating a new comment. |
| 13 | * |
| 14 | * @package App\Modules\Comments\Application\DTO |
| 15 | */ |
| 16 | final readonly class CreateCommentDto |
| 17 | { |
| 18 | /** |
| 19 | * CreateCommentDto constructor. |
| 20 | * |
| 21 | * @param array<int, array<string, mixed>> $attachments Raw uploaded files payload. |
| 22 | */ |
| 23 | public function __construct( |
| 24 | public string $targetModule, |
| 25 | public int $targetRecordId, |
| 26 | public string $content, |
| 27 | public ?int $parentId = null, |
| 28 | public bool $isPinned = false, |
| 29 | public bool $isVerified = false, |
| 30 | public array $attachments = [] |
| 31 | ) { |
| 32 | } |
| 33 | } |