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
LinkSection 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 ApiPlatform\Metadata\ApiProperty;
8use App\ApiResource\LinkList;
9use Symfony\Component\Serializer\Attribute\Groups;
10
11/**
12 * A "## " section of the link list with its entries.
13 */
14final readonly class LinkSection
15{
16    /**
17     * @param list<Link> $links
18     */
19    public function __construct(
20        #[Groups([LinkList::READ])]
21        public string $title,
22        #[Groups([LinkList::READ])]
23        #[ApiProperty(genId: false)]
24        public array $links = [],
25    ) {
26    }
27}