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
DavResource
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\Dav\Domain\Model;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11/**
12 * DAV Resource Entity / Value Object.
13 *
14 * Encapsulates an iCalendar (.ics) or vCard (.vcf) payload with standard RFC metadata.
15 *
16 * @package App\Modules\Dav\Domain\Model
17 */
18final readonly class DavResource
19{
20    /**
21     * DavResource constructor.
22     *
23     * @param string $uid Unique identifier (RFC 5545 UID or RFC 6350 UID).
24     * @param string $etag HTTP entity tag for concurrency control.
25     * @param string $content Raw text body (.ics or .vcf format).
26     * @param string $contentType MIME type header (text/calendar or text/vcard).
27     * @param string $url Relative or absolute resource URI path.
28     */
29    public function __construct(
30        public string $uid,
31        public string $etag,
32        public string $content,
33        public string $contentType,
34        public string $url = ''
35    ) {
36    }
37}