Lines
100.00%
3 / 3
Methods
100.00%
2 / 2
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| listConfigOverrides | 100.00% | 2 / 2 | 100.00% | 1 / 1 | 3 | ||
| 9 | final readonly class DaemonLaunchOptions | |
| 10 | { | |
| 11 | public function __construct( | |
| 12 | public ?string $configFile = null, | |
| 13 | public AppSelection $selection = new AppSelection(), | |
| 14 | public ?string $logLevel = null, | |
| 15 | public bool $watch = false, | |
| 16 | public bool $dryRun = false, | |
| 17 | ) {} | |
| 18 | ||
| 19 | /** @return array<string, mixed> */ | |
| 20 | public function listConfigOverrides(): array | |
| 21 | { | |
| 22 | $overrides = $this->logLevel === null ? [] : ['log_level' => $this->logLevel]; | |
| 23 | ||
| 24 | return $this->dryRun ? [...$overrides, 'ha_calls' => ['dry_run' => true]] : $overrides; | |
| 25 | } | |
| 26 | } |