|
15 | 15 |
|
16 | 16 | class SimpleConfig extends BaseConfig |
17 | 17 | { |
18 | | - public $QZERO; |
19 | | - public $QZEROSTR; |
20 | | - public $QEMPTYSTR; |
21 | | - public $QFALSE; |
22 | | - public $first = 'foo'; |
23 | | - public $second = 'bar'; |
24 | | - public $FOO; |
25 | | - public $onedeep; |
26 | | - public $default = [ |
| 18 | + public ?string $QZERO = null; |
| 19 | + public ?string $QZEROSTR = null; |
| 20 | + public ?string $QEMPTYSTR = null; |
| 21 | + public bool|string|null $QFALSE = null; |
| 22 | + public string $first = 'foo'; |
| 23 | + public string $second = 'bar'; |
| 24 | + public ?string $FOO = null; |
| 25 | + public ?string $onedeep = null; |
| 26 | + |
| 27 | + /** |
| 28 | + * @var array<string, string|null> |
| 29 | + */ |
| 30 | + public array $default = [ |
27 | 31 | 'name' => null, |
28 | 32 | ]; |
29 | | - public $simple = [ |
| 33 | + |
| 34 | + /** |
| 35 | + * @var array<string, string|null> |
| 36 | + */ |
| 37 | + public array $simple = [ |
30 | 38 | 'name' => null, |
31 | 39 | ]; |
32 | 40 |
|
33 | 41 | // properties for environment override testing |
34 | | - public $alpha = 'one'; |
35 | | - public $bravo = 'two'; |
36 | | - public $charlie = 'three'; |
37 | | - public $delta = 'four'; |
38 | | - public $echo = ''; |
39 | | - public $foxtrot = 'false'; |
40 | | - public $fruit = 'pineapple'; |
41 | | - public $dessert = ''; |
42 | | - public $golf = 18; |
43 | | - public $crew = [ |
| 42 | + public string $alpha = 'one'; |
| 43 | + public string $bravo = 'two'; |
| 44 | + public string $charlie = 'three'; |
| 45 | + public string $delta = 'four'; |
| 46 | + public string $echo = ''; |
| 47 | + public bool|string $foxtrot = 'false'; |
| 48 | + public string $fruit = 'pineapple'; |
| 49 | + public string $dessert = ''; |
| 50 | + public int $golf = 18; |
| 51 | + |
| 52 | + /** |
| 53 | + * @var array<string, bool|string> |
| 54 | + */ |
| 55 | + public array $crew = [ |
44 | 56 | 'captain' => 'Kirk', |
45 | 57 | 'science' => 'Spock', |
46 | 58 | 'doctor' => 'Bones', |
47 | 59 | 'comms' => 'Uhuru', |
48 | 60 | ]; |
49 | | - public $shortie; |
50 | | - public $longie; |
51 | | - public $onedeep_value; |
52 | | - public $one_deep = [ |
| 61 | + |
| 62 | + public ?string $shortie = null; |
| 63 | + public ?string $longie = null; |
| 64 | + public ?string $onedeep_value = null; |
| 65 | + |
| 66 | + /** |
| 67 | + * @var array<string, string|null> |
| 68 | + */ |
| 69 | + public array $one_deep = [ |
53 | 70 | 'under_deep' => null, |
54 | 71 | ]; |
55 | | - public $float = 12.34; |
56 | | - public $int = 1234; |
57 | | - public $password = 'secret'; |
58 | | - public ?int $size = null; |
| 72 | + |
| 73 | + public float $float = 12.34; |
| 74 | + public int $int = 1234; |
| 75 | + public string $password = 'secret'; |
| 76 | + public ?int $size = null; |
59 | 77 | } |
0 commit comments