* http://www.gnu.org/copyleft/gpl.html
*
* @file
- * @license GNU GPL v2 or later
+ * @license GPL-2.0-or-later
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
$itemKey = array_keys( array_slice( $this->cachedChunks, 0, 1 ) );
$itemKey = array_shift( $itemKey );
- if ( !is_integer( $itemKey ) ) {
+ if ( !is_int( $itemKey ) ) {
wfWarn( "Attempted to get item with non-numeric key while " .
"the next item in the queue has a key ($itemKey) in " . __METHOD__ );
} elseif ( is_null( $itemKey ) ) {
$args = [ $args ];
}
- $value = call_user_func_array( $computeFunction, $args );
+ $value = $computeFunction( ...$args );
if ( $this->cacheEnabled ) {
if ( is_null( $key ) ) {
throw new MWException( 'No cache key set, so cannot obtain or save the CacheHelper values.' );
}
- return call_user_func_array( 'wfMemcKey', $this->cacheKey );
+ return wfMemcKey( ...array_values( $this->cacheKey ) );
}
/**