Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Types
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
5namespace Cosray\Schema;
6
7use Attribute;
8
9/**
10 * The node types a collection lists, as handles or classes. The panel lists
11 * them in any state, unpublished and hidden entries included.
12 */
13#[Attribute(Attribute::TARGET_CLASS)]
14readonly class Types
15{
16    /** @var list<string> */
17    public array $types;
18
19    public function __construct(string ...$types)
20    {
21        $this->types = array_values($types);
22    }
23}