phpcs: Fix WhiteSpace.LanguageConstructSpacing warnings
[lhc/web/wiklou.git] / includes / cache / LocalisationCache.php
index a313e52..0f229f9 100644 (file)
@@ -499,7 +499,7 @@ class LocalisationCache {
                wfProfileIn( __METHOD__ );
                // Disable APC caching
                $_apcEnabled = ini_set( 'apc.cache_by_default', '0' );
-               include( $_fileName );
+               include $_fileName;
                ini_set( 'apc.cache_by_default', $_apcEnabled );
 
                if ( $_fileType == 'core' || $_fileType == 'extension' ) {
@@ -525,7 +525,7 @@ class LocalisationCache {
                }
                try {
                        $compiledRules = CLDRPluralRuleEvaluator::compile( $rules );
-               } catch( CLDRPluralRuleError $e ) {
+               } catch ( CLDRPluralRuleError $e ) {
                        wfDebugLog( 'l10n', $e->getMessage() . "\n" );
                        return array();
                }
@@ -611,10 +611,11 @@ class LocalisationCache {
         */
        protected function readSourceFilesAndRegisterDeps( $code, &$deps ) {
                global $IP;
-
                wfProfileIn( __METHOD__ );
+
                $fileName = Language::getMessagesFileName( $code );
                if ( !file_exists( $fileName ) ) {
+                       wfProfileOut( __METHOD__ );
                        return false;
                }
 
@@ -630,8 +631,8 @@ class LocalisationCache {
 
                $deps['plurals'] = new FileDependency( "$IP/languages/data/plurals.xml" );
                $deps['plurals-mw'] = new FileDependency( "$IP/languages/data/plurals-mediawiki.xml" );
-               wfProfileOut( __METHOD__ );
 
+               wfProfileOut( __METHOD__ );
                return $data;
        }
 
@@ -722,6 +723,7 @@ class LocalisationCache {
                wfProfileIn( __METHOD__ );
 
                if ( !$code ) {
+                       wfProfileOut( __METHOD__ );
                        throw new MWException( "Invalid language code requested" );
                }
                $this->recachedLangs[$code] = true;
@@ -851,6 +853,7 @@ class LocalisationCache {
                wfRunHooks( 'LocalisationCacheRecache', array( $this, $code, &$allData ) );
 
                if ( is_null( $allData['namespaceNames'] ) ) {
+                       wfProfileOut( __METHOD__ );
                        throw new MWException( __METHOD__ . ': Localisation data failed sanity check! ' .
                                'Check that your languages/messages/MessagesEn.php file is intact.' );
                }