@@ -27,7 +27,7 @@ class config implements \ArrayAccess, \IteratorAggregate, \Countable
2727 /**
2828 * Creates a configuration container with a default set of values
2929 *
30- * @param array<string,string> $config The configuration data.
30+ * @param array<string,int| string> $config The configuration data.
3131 */
3232 public function __construct (array $ config )
3333 {
@@ -74,22 +74,22 @@ public function offsetGet($key)
7474 * The configuration change will not persist. It will be lost
7575 * after the request.
7676 *
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.
7979 */
8080 #[\ReturnTypeWillChange]
81- public function offsetSet ($ key , $ value )
81+ public function offsetSet ($ offset , $ value )
8282 {
83- $ this ->config [$ key ] = $ value ;
83+ $ this ->config [$ offset ] = $ value ;
8484 }
8585
8686 /**
8787 * Called when deleting a configuration value directly, triggers an error.
8888 *
89- * @param string $key The configuration option's name.
89+ * @param string $offset The configuration option's name.
9090 */
9191 #[\ReturnTypeWillChange]
92- public function offsetUnset ($ key )
92+ public function offsetUnset ($ offset ): never
9393 {
9494 trigger_error ('Config values have to be deleted explicitly with the \phpbb\config\config::delete($key) method. ' , E_USER_ERROR );
9595 }
@@ -121,7 +121,7 @@ public function delete($key, $use_cache = true)
121121 * Sets a configuration option's value
122122 *
123123 * @param string $key The configuration option's name
124- * @param string $value New configuration value
124+ * @param int| string $value New configuration value
125125 * @param bool $use_cache Whether this variable should be cached or if it
126126 * changes too frequently to be efficiently cached.
127127 */
@@ -135,8 +135,8 @@ public function set($key, $value, $use_cache = true)
135135 * current configuration value or the configuration value does not exist yet.
136136 *
137137 * @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
140140 * @param bool $use_cache Whether this variable should be cached or if it
141141 * changes too frequently to be efficiently cached.
142142 * @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)
157157 * only after set_atomic has been called.
158158 *
159159 * @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
161161 * @throws \phpbb\exception\http_exception when config value is set and not equal to new_value.
162162 * @return bool True if the value was changed, false otherwise.
163163 */
0 commit comments