|
9 | 9 |
|
10 | 10 | namespace StaticDeploy; |
11 | 11 |
|
12 | | -final class OptionSpec { |
| 12 | +final readonly class OptionSpec { |
13 | 13 |
|
14 | | - public readonly string $name; |
| 14 | + public string $name; |
15 | 15 |
|
16 | | - public readonly string $default_value; |
| 16 | + public string $default_value; |
17 | 17 |
|
18 | | - public readonly ?array $allowed_values; |
| 18 | + public ?array $allowed_values; |
19 | 19 |
|
20 | | - public readonly string $filter_name; |
| 20 | + public string $filter_name; |
21 | 21 |
|
22 | | - public readonly string $input_type; |
| 22 | + public string $input_type; |
23 | 23 |
|
24 | 24 | public function __construct( |
25 | | - public readonly string $type, |
| 25 | + public string $type, |
26 | 26 | string $name, |
27 | 27 | string $default_value, |
28 | | - public readonly string $label, |
29 | | - public readonly string $description, |
30 | | - public readonly ?string $default_blob_value = null, |
| 28 | + public string $label, |
| 29 | + public string $description, |
| 30 | + public ?string $default_blob_value = null, |
31 | 31 | ?string $filter_name = null, |
32 | 32 | ?array $allowed_values = null, |
33 | 33 | ?string $input_type = null, |
34 | | - public readonly ?int $min_value = null, |
| 34 | + public ?int $min_value = null, |
35 | 35 | /** |
36 | 36 | * Used to import from WP2Static options |
37 | 37 | */ |
38 | | - public readonly ?string $wp2static_name = null, |
| 38 | + public ?string $wp2static_name = null, |
39 | 39 | /** |
40 | 40 | * Used to import from WP2Static options |
41 | 41 | */ |
42 | | - public readonly ?string $wp2static_table = null, |
| 42 | + public ?string $wp2static_table = null, |
43 | 43 | ) { |
44 | 44 | if ( $allowed_values !== null && ! in_array( $default_value, $allowed_values, true ) ) { |
45 | 45 | $msg = "Default value {$default_value} not in allowed values for option {$name}"; |
|
0 commit comments