Lines 0.00% 0 / 2
Functions and Methods 0.00% 0 / 2
Classes and Traits 0.00% 0 / 1
Name Lines Functions and Methods CRAP Classes and Traits
SwitchConfig 0.00% 0 / 2 0.00% 0 / 2 6 0.00% 0 / 1
 __construct 0.00% 0 / 1 0.00% 0 / 1 2
 getPlatform 0.00% 0 / 1 0.00% 0 / 1 2
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Contracts\Exposure;
6
7use Stewart\Contracts\Exception\ExposureException;
8
9final readonly class SwitchConfig extends ExposedEntityConfig
10{
11    /** @throws ExposureException */
12    public function __construct(
13        public ?SwitchDeviceClass $deviceClass = null,
14        ?string $name = null,
15        ?string $icon = null,
16        ?EntityCategory $entityCategory = null,
17        bool $enabledByDefault = true,
18    ) {
19        parent::__construct($name, $icon, $entityCategory, $enabledByDefault);
20    }
21
22    public function getPlatform(): ExposedPlatform
23    {
24        return ExposedPlatform::Switch;
25    }
26}