*
* @param File $file File to use
* @param array $extendedMetadata
- * @param int $maxCacheTime Hook handlers might use this parameter to override cache time
+ * @param int &$maxCacheTime Hook handlers might use this parameter to override cache time
*
* @return array [<property name> => ['value' => <value>]], or [] on error
* @since 1.23
}
return $newValue;
} else { // _type is 'ul' or 'ol' or missing in which case it defaults to 'ul'
- list( $k, $v ) = each( $value );
- if ( $k === '_type' ) {
- $v = current( $value );
+ $v = reset( $value );
+ if ( key( $value ) === '_type' ) {
+ $v = next( $value );
}
return $v;
}
/**
* Takes an array returned by the getExtendedMetadata* functions,
* and resolves multi-language values in it.
- * @param array $metadata
+ * @param array &$metadata
* @since 1.23
*/
protected function resolveMultilangMetadata( &$metadata ) {
/**
* Takes an array returned by the getExtendedMetadata* functions,
* and turns all fields into single-valued ones by dropping extra values.
- * @param array $metadata
+ * @param array &$metadata
* @since 1.25
*/
protected function discardMultipleValues( &$metadata ) {
/**
* Makes sure the given array is a valid API response fragment
- * @param array $arr
+ * @param array &$arr
*/
protected function sanitizeArrayForAPI( &$arr ) {
if ( !is_array( $arr ) ) {