Lines 100.00% 6 / 6
Methods 100.00% 2 / 2
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 __construct 100.00% 1 / 1 100.00% 1 / 1 1
 fromSection 100.00% 5 / 5 100.00% 1 / 1 1
9final readonly class DomainAttributesConfig
10{
11    /**
12     * @param list<string> $include
13     * @param list<string> $exclude
14     */
15    public function __construct(
16        public string $domain,
17        public array $include,
18        public array $exclude,
19    ) {}
20
21    /** @throws ConfigurationException */
22    public static function fromSection(ConfigSection $attributes, string $domain): self
23    {
24        return new self(
25            domain: $domain,
26            include: $attributes->readStringList('include'),
27            exclude: $attributes->readStringList('exclude'),
28        );
29    }
30}