* @file
* @ingroup DifferenceEngine
*/
+use MediaWiki\MediaWikiServices;
/** @deprecated use class constant instead */
define( 'MW_DIFF_VERSION', '1.11a' );
* @return bool|string
*/
public function generateTextDiffBody( $otext, $ntext ) {
- $diff = function() use ( $otext, $ntext ) {
+ $diff = function () use ( $otext, $ntext ) {
$time = microtime( true );
$result = $this->textDiff( $otext, $ntext );
$time = intval( ( microtime( true ) - $time ) * 1000 );
- $this->getStats()->timing( 'diff_time', $time );
+ MediaWikiServices::getInstance()->getStatsdDataFactory()->timing( 'diff_time', $time );
// Log requests slower than 99th percentile
if ( $time > 100 && $this->mOldPage && $this->mNewPage ) {
wfDebugLog( 'diff',
* @param Status $status
* @throws FatalError
*/
- $error = function( $status ) {
+ $error = function ( $status ) {
throw new FatalError( $status->getWikiText() );
};