$startTime = microtime( true );
if ( $this->profiler ) {
- call_user_func( [ $this->profiler, 'profileIn' ], $queryProf );
+ $this->profiler->profileIn( $queryProf );
}
$this->affectedRowCount = null;
$ret = $this->doQuery( $commentedSql );
$this->affectedRowCount = $this->affectedRows();
if ( $this->profiler ) {
- call_user_func( [ $this->profiler, 'profileOut' ], $queryProf );
+ $this->profiler->profileOut( $queryProf );
}
$queryRuntime = max( microtime( true ) - $startTime, 0.0 );
$e = null;
do {
try {
- $retVal = call_user_func_array( $function, $args );
+ $retVal = $function( ...$args );
break;
} catch ( DBQueryError $e ) {
if ( $this->wasDeadlock() ) {
// No transaction is active nor will start implicitly, so make one for this callback
$this->startAtomic( __METHOD__, self::ATOMIC_CANCELABLE );
try {
- call_user_func( $callback, $this );
+ $callback( $this );
$this->endAtomic( __METHOD__ );
} catch ( Exception $e ) {
$this->cancelAtomic( __METHOD__ );
try {
++$count;
list( $phpCallback ) = $callback;
- call_user_func( $phpCallback, $this );
+ $phpCallback( $this );
} catch ( Exception $ex ) {
- call_user_func( $this->errorLogger, $ex );
+ $this->errorLogger( $ex );
$e = $e ?: $ex;
}
}
try {
$phpCallback( $trigger, $this );
} catch ( Exception $ex ) {
- call_user_func( $this->errorLogger, $ex );
+ ( $this->errorLogger )( $ex );
$e = $e ?: $ex;
}
}
) {
$sectionId = $this->startAtomic( $fname, $cancelable );
try {
- $res = call_user_func_array( $callback, [ $this, $fname ] );
+ $res = $callback( $this, $fname );
} catch ( Exception $e ) {
$this->cancelAtomic( $fname, $sectionId );
$cmd = $this->replaceVars( $cmd );
if ( $inputCallback ) {
- $callbackResult = call_user_func( $inputCallback, $cmd );
+ $callbackResult = $inputCallback( $cmd );
if ( is_string( $callbackResult ) || !$callbackResult ) {
$cmd = $callbackResult;
$res = $this->query( $cmd, $fname );
if ( $resultCallback ) {
- call_user_func( $resultCallback, $res, $this );
+ $resultCallback( $res, $this );
}
if ( false === $res ) {