*/
public function processTemplate( $templateName, $args, array $scopes = [] ) {
$template = $this->getTemplate( $templateName );
- return call_user_func( $template, $args, $scopes );
+ return $template( $args, $scopes );
}
}
wfDebugLog( 'cookie', 'already set ' . $func . ': "' . implode( '", "', $data ) . '"' );
} else {
wfDebugLog( 'cookie', $func . ': "' . implode( '", "', $data ) . '"' );
- if ( call_user_func_array( $func, array_values( $data ) ) ) {
+ if ( $func( ...array_values( $data ) ) ) {
self::$setCookies[$key] = $deleting ? null : [ $func, $data ];
}
}
if ( !is_callable( $function ) ) {
return null;
} else {
- $this->$name = call_user_func( $function );
+ $this->$name = $function();
return $this->$name;
}
public function getDefault() {
$default = parent::getDefault();
if ( $default instanceof Closure ) {
- $default = call_user_func( $default, $this->mParams );
+ $default = $default( $this->mParams );
}
return $default;
}
}
throw new UnexpectedValueException( "callback '$cb' is not callable" );
}
- call_user_func( $cb, $info['credits'][$name] );
+ $cb( $info['credits'][$name] );
}
}