Lines 100.00% 1 / 1
Functions and Methods 100.00% 1 / 1
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
Link 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
3declare(strict_types=1);
4
5namespace App\LinkList;
6
7use App\ApiResource\LinkList;
8use Symfony\Component\Serializer\Attribute\Groups;
9
10/**
11 * An entry of the link list: "- [Title](https://…) — Description".
12 */
13final readonly class Link
14{
15    public function __construct(
16        #[Groups([LinkList::READ])]
17        public string $title,
18        #[Groups([LinkList::READ])]
19        public string $url,
20        /** Plain text, null without one. */
21        #[Groups([LinkList::READ])]
22        public ?string $description = null,
23    ) {
24    }
25}