From 6e938b08ba9e817ba74e3e3b31fa3e5ff9da2852 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Wed, 20 Nov 2013 15:03:00 +0100 Subject: [PATCH] Break long lines in MWDebug class Change-Id: I65a080f8024a79e6e6b4ccc39e457b26d3637cf7 --- includes/debug/Debug.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/includes/debug/Debug.php b/includes/debug/Debug.php index 6e9ccc4129..acd0724815 100644 --- a/includes/debug/Debug.php +++ b/includes/debug/Debug.php @@ -31,7 +31,6 @@ * @since 1.19 */ class MWDebug { - /** * Log lines * @@ -185,7 +184,9 @@ class MWDebug { * MWDebug::deprecated() (Added in 1.20). * @return mixed */ - public static function deprecated( $function, $version = false, $component = false, $callerOffset = 2 ) { + public static function deprecated( $function, $version = false, + $component = false, $callerOffset = 2 + ) { $callerDescription = self::getCallerDescription( $callerOffset ); $callerFunc = $callerDescription['func']; @@ -227,7 +228,11 @@ class MWDebug { if ( $sendToLog ) { global $wgDevelopmentWarnings; // we could have a more specific $wgDeprecationWarnings setting. - self::sendWarning( $msg, $callerDescription, $wgDevelopmentWarnings ? E_USER_DEPRECATED : false ); + self::sendWarning( + $msg, + $callerDescription, + $wgDevelopmentWarnings ? E_USER_DEPRECATED : false + ); } if ( self::$enabled ) { @@ -445,10 +450,15 @@ class MWDebug { $display = "\xc2\xa0"; } - if ( !$ident && $diff < 0 && substr( $display, 0, 9 ) != 'Entering ' && substr( $display, 0, 8 ) != 'Exiting ' ) { + if ( !$ident + && $diff < 0 + && substr( $display, 0, 9 ) != 'Entering ' + && substr( $display, 0, 8 ) != 'Exiting ' + ) { $ident = $curIdent; $diff = 0; - $display = '' . nl2br( htmlspecialchars( $display ) ) . ''; + $display = '' . + nl2br( htmlspecialchars( $display ) ) . ''; } else { $display = nl2br( htmlspecialchars( $display ) ); } @@ -517,6 +527,7 @@ class MWDebug { global $wgVersion, $wgRequestTime; $request = $context->getRequest(); + return array( 'mwVersion' => $wgVersion, 'phpVersion' => PHP_VERSION, -- 2.20.1