@@ -50,73 +50,73 @@ class OptionsResolver implements Options
50
50
/**
51
51
* The names of all defined options.
52
52
*/
53
- private $ defined = [];
53
+ private array $ defined = [];
54
54
55
55
/**
56
56
* The default option values.
57
57
*/
58
- private $ defaults = [];
58
+ private array $ defaults = [];
59
59
60
60
/**
61
61
* A list of closure for nested options.
62
62
*
63
63
* @var \Closure[][]
64
64
*/
65
- private $ nested = [];
65
+ private array $ nested = [];
66
66
67
67
/**
68
68
* The names of required options.
69
69
*/
70
- private $ required = [];
70
+ private array $ required = [];
71
71
72
72
/**
73
73
* The resolved option values.
74
74
*/
75
- private $ resolved = [];
75
+ private array $ resolved = [];
76
76
77
77
/**
78
78
* A list of normalizer closures.
79
79
*
80
80
* @var \Closure[][]
81
81
*/
82
- private $ normalizers = [];
82
+ private array $ normalizers = [];
83
83
84
84
/**
85
85
* A list of accepted values for each option.
86
86
*/
87
- private $ allowedValues = [];
87
+ private array $ allowedValues = [];
88
88
89
89
/**
90
90
* A list of accepted types for each option.
91
91
*/
92
- private $ allowedTypes = [];
92
+ private array $ allowedTypes = [];
93
93
94
94
/**
95
95
* A list of info messages for each option.
96
96
*/
97
- private $ info = [];
97
+ private array $ info = [];
98
98
99
99
/**
100
100
* A list of closures for evaluating lazy options.
101
101
*/
102
- private $ lazy = [];
102
+ private array $ lazy = [];
103
103
104
104
/**
105
105
* A list of lazy options whose closure is currently being called.
106
106
*
107
107
* This list helps detecting circular dependencies between lazy options.
108
108
*/
109
- private $ calling = [];
109
+ private array $ calling = [];
110
110
111
111
/**
112
112
* A list of deprecated options.
113
113
*/
114
- private $ deprecated = [];
114
+ private array $ deprecated = [];
115
115
116
116
/**
117
117
* The list of options provided by the user.
118
118
*/
119
- private $ given = [];
119
+ private array $ given = [];
120
120
121
121
/**
122
122
* Whether the instance is locked for reading.
@@ -126,19 +126,19 @@ class OptionsResolver implements Options
126
126
* process. If any option is changed after being read, all evaluated
127
127
* lazy options that depend on this option would become invalid.
128
128
*/
129
- private $ locked = false ;
129
+ private bool $ locked = false ;
130
130
131
- private $ parentsOptions = [];
131
+ private array $ parentsOptions = [];
132
132
133
133
/**
134
134
* Whether the whole options definition is marked as array prototype.
135
135
*/
136
- private $ prototype ;
136
+ private ? bool $ prototype = null ;
137
137
138
138
/**
139
139
* The prototype array's index that is being read.
140
140
*/
141
- private $ prototypeIndex ;
141
+ private int | string | null $ prototypeIndex = null ;
142
142
143
143
/**
144
144
* Whether to ignore undefined options.
0 commit comments