@@ -27,7 +27,7 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable
27
27
/**
28
28
* Creates a configuration container with a default set of values
29
29
*
30
- * @param array<string,string> $config The configuration data.
30
+ * @param array<string,int| string> $config The configuration data.
31
31
*/
32
32
public function __construct (array $ config )
33
33
{
@@ -74,22 +74,22 @@ public function offsetGet($key)
74
74
* The configuration change will not persist. It will be lost
75
75
* after the request.
76
76
*
77
- * @param string $key The configuration option's name.
78
- * @param string $value The temporary value.
77
+ * @param string $offset The configuration option's name.
78
+ * @param int| string $value The temporary value.
79
79
*/
80
80
#[\ReturnTypeWillChange]
81
- public function offsetSet ($ key , $ value )
81
+ public function offsetSet ($ offset , $ value )
82
82
{
83
- $ this ->config [$ key ] = $ value ;
83
+ $ this ->config [$ offset ] = $ value ;
84
84
}
85
85
86
86
/**
87
87
* Called when deleting a configuration value directly, triggers an error.
88
88
*
89
- * @param string $key The configuration option's name.
89
+ * @param string $offset The configuration option's name.
90
90
*/
91
91
#[\ReturnTypeWillChange]
92
- public function offsetUnset ($ key )
92
+ public function offsetUnset ($ offset ): never
93
93
{
94
94
trigger_error ('Config values have to be deleted explicitly with the \phpbb\config\config::delete($key) method. ' , E_USER_ERROR );
95
95
}
@@ -121,7 +121,7 @@ public function delete($key, $use_cache = true)
121
121
* Sets a configuration option's value
122
122
*
123
123
* @param string $key The configuration option's name
124
- * @param string $value New configuration value
124
+ * @param int| string $value New configuration value
125
125
* @param bool $use_cache Whether this variable should be cached or if it
126
126
* changes too frequently to be efficiently cached.
127
127
*/
@@ -135,8 +135,8 @@ public function set($key, $value, $use_cache = true)
135
135
* current configuration value or the configuration value does not exist yet.
136
136
*
137
137
* @param string $key The configuration option's name
138
- * @param string $old_value Current configuration value
139
- * @param string $new_value New configuration value
138
+ * @param int| string $old_value Current configuration value
139
+ * @param int| string $new_value New configuration value
140
140
* @param bool $use_cache Whether this variable should be cached or if it
141
141
* changes too frequently to be efficiently cached.
142
142
* @return bool True if the value was changed, false otherwise.
@@ -157,7 +157,7 @@ public function set_atomic($key, $old_value, $new_value, $use_cache = true)
157
157
* only after set_atomic has been called.
158
158
*
159
159
* @param string $key The configuration option's name
160
- * @param string $new_value New configuration value
160
+ * @param int| string $new_value New configuration value
161
161
* @throws \phpbb\exception\http_exception when config value is set and not equal to new_value.
162
162
* @return bool True if the value was changed, false otherwise.
163
163
*/
0 commit comments