Fix some PHPCS issues
authorJackmcbarn <jackmcbarn@gmail.com>
Fri, 26 Jun 2015 05:32:28 +0000 (01:32 -0400)
committerJackmcbarn <jackmcbarn@gmail.com>
Fri, 26 Jun 2015 05:32:28 +0000 (01:32 -0400)
Change-Id: I6289ce362f8dfde7baf2b665f082820898844973

13 files changed:
includes/actions/InfoAction.php
includes/api/ApiFeedWatchlist.php
includes/api/ApiFormatPhp.php
includes/cache/MessageCache.php
includes/htmlform/HTMLTextAreaField.php
includes/htmlform/HTMLTextField.php
includes/libs/BufferingStatsdDataFactory.php
includes/libs/normal/UtfNormalUtil.php
includes/media/FormatMetadata.php
includes/parser/ParserCache.php
includes/poolcounter/PoolCounter.php
includes/profiler/output/ProfilerOutputDump.php
includes/title/MalformedTitleException.php

index 203c687..bf86b51 100644 (file)
@@ -448,7 +448,8 @@ class InfoAction extends FormlessAction {
                                }
                        }
                        $expiry = $title->getRestrictionExpiry( $restrictionType );
-                       $formattedexpiry = $this->msg( 'parentheses', $this->getLanguage()->formatExpiry( $expiry ) )->escaped();
+                       $formattedexpiry = $this->msg( 'parentheses',
+                               $this->getLanguage()->formatExpiry( $expiry ) )->escaped();
                        $message .= $this->msg( 'word-separator' )->escaped() . $formattedexpiry;
 
                        // Messages: restriction-edit, restriction-move, restriction-create,
index d1beef8..853b138 100644 (file)
@@ -126,7 +126,8 @@ class ApiFeedWatchlist extends ApiBase {
 
                        $msg = wfMessage( 'watchlist' )->inContentLanguage()->text();
 
-                       $feedTitle = $this->getConfig()->get( 'Sitename' ) . ' - ' . $msg . ' [' . $this->getConfig()->get( 'LanguageCode' ) . ']';
+                       $feedTitle = $this->getConfig()->get( 'Sitename' ) . ' - ' . $msg .
+                               ' [' . $this->getConfig()->get( 'LanguageCode' ) . ']';
                        $feedUrl = SpecialPage::getTitleFor( 'Watchlist' )->getFullURL();
 
                        $feed = new $feedClasses[$params['feedformat']] (
index d88dd40..6420a5b 100644 (file)
@@ -68,7 +68,8 @@ class ApiFormatPhp extends ApiFormatBase {
                        preg_match( '/\<\s*cross-domain-policy\s*\>/i', $text )
                ) {
                        $this->dieUsage(
-                               'This response cannot be represented using format=php. See https://bugzilla.wikimedia.org/show_bug.cgi?id=66776',
+                               'This response cannot be represented using format=php. ' .
+                               'See https://bugzilla.wikimedia.org/show_bug.cgi?id=66776',
                                'internalerror'
                        );
                }
index 79f4d6c..585fcd3 100644 (file)
@@ -1113,7 +1113,8 @@ class MessageCache {
 
                if ( !$title || !$title instanceof Title ) {
                        global $wgTitle;
-                       wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers( 5 ) . ' with no title set.' );
+                       wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' .
+                               wfGetAllCallers( 5 ) . ' with no title set.' );
                        $title = $wgTitle;
                }
                // Sometimes $wgTitle isn't set either...
index a4ed95f..e4f78b2 100644 (file)
@@ -14,7 +14,7 @@ class HTMLTextAreaField extends HTMLFormField {
 
        function getSpellCheck() {
                $val = isset( $this->mParams['spellcheck'] ) ? $this->mParams['spellcheck'] : null;
-               if( is_bool( $val ) ) {
+               if ( is_bool( $val ) ) {
                        // "spellcheck" attribute literally requires "true" or "false" to work.
                        return $val === true ? 'true' : 'false';
                }
index 06b397f..9c5b868 100644 (file)
@@ -7,7 +7,7 @@ class HTMLTextField extends HTMLFormField {
 
        function getSpellCheck() {
                $val = isset( $this->mParams['spellcheck'] ) ? $this->mParams['spellcheck'] : null;
-               if( is_bool( $val ) ) {
+               if ( is_bool( $val ) ) {
                        // "spellcheck" attribute literally requires "true" or "false" to work.
                        return $val === true ? 'true' : 'false';
                }
index 457237a..0caf90b 100644 (file)
@@ -23,7 +23,6 @@
 use Liuggio\StatsdClient\Entity\StatsdDataInterface;
 use Liuggio\StatsdClient\Factory\StatsdDataFactory;
 
-
 /**
  * A factory for application metric data.
  *
index ad9a2b9..9ed9bc2 100644 (file)
@@ -27,6 +27,7 @@
 
 
 use UtfNormal\Utils;
+
 /**
  * Return UTF-8 sequence for a given Unicode code point.
  *
index 17e3dda..0fee8cc 100644 (file)
@@ -1732,8 +1732,9 @@ class FormatMetadata extends ContextSource {
        }
 
        /**
-        * Turns an XMP-style multivalue array into a single value by dropping all but the first value.
-        * If the value is not a multivalue array (or a multivalue array inside a multilang array), it is returned unchanged.
+        * Turns an XMP-style multivalue array into a single value by dropping all but the first
+        * value. If the value is not a multivalue array (or a multivalue array inside a multilang
+        * array), it is returned unchanged.
         * See mediawiki.org/wiki/Manual:File_metadata_handling#Multi-language_array_format
         * @param mixed $value
         * @return mixed The value, or the first value if there were multiple ones
@@ -1742,7 +1743,8 @@ class FormatMetadata extends ContextSource {
        protected function resolveMultivalueValue( $value ) {
                if ( !is_array( $value ) ) {
                        return $value;
-               } elseif ( isset( $value['_type'] ) && $value['_type'] === 'lang' ) { // if this is a multilang array, process fields separately
+               } elseif ( isset( $value['_type'] ) && $value['_type'] === 'lang' ) {
+                       // if this is a multilang array, process fields separately
                        $newValue = array();
                        foreach ( $value as $k => $v ) {
                                $newValue[$k] = $this->resolveMultivalueValue( $v );
index 117b6e7..44b0bc9 100644 (file)
@@ -217,7 +217,6 @@ class ParserCache {
                        ? $article->getPage()
                        : $article;
 
-
                if ( !$useOutdated && $value->expired( $touched ) ) {
                        wfIncrStats( "pcache.miss.expired" );
                        $cacheTime = $value->getCacheTime();
index 5692d73..1ec14aa 100644 (file)
@@ -192,10 +192,11 @@ abstract class PoolCounter {
        }
 
        /**
-        * Given a key (any string) and the number of lots, returns a slot number (an integer from the [0..($slots-1)] range).
-        * This is used for a global limit on the number of instances  of a given type that can acquire a lock.
-        * The hashing is deterministic so that PoolCounter::$workers is always an upper limit of how many instances with
-        * the same key can acquire a lock.
+        * Given a key (any string) and the number of lots, returns a slot number (an integer from
+        * the [0..($slots-1)] range). This is used for a global limit on the number of instances of
+        * a given type that can acquire a lock. The hashing is deterministic so that
+        * PoolCounter::$workers is always an upper limit of how many instances with the same key
+        * can acquire a lock.
         *
         * @param string $key PoolCounter instance key (any string)
         * @param int $slots The number of slots (max allowed value is 65536)
index bf4b85c..09f5688 100644 (file)
@@ -45,7 +45,11 @@ class ProfilerOutputDump extends ProfilerOutput {
 
        public function log( array $stats ) {
                $data = $this->collector->getRawData();
-               $filename = sprintf( "%s/%s.%s%s", $this->params['outputDir'], uniqid(), $this->collector->getProfileID(), $this->suffix );
+               $filename = sprintf( "%s/%s.%s%s",
+                       $this->params['outputDir'],
+                       uniqid(),
+                       $this->collector->getProfileID(),
+                       $this->suffix );
                file_put_contents( $filename, serialize( $data ) );
        }
 }
index fb89e4f..0892ce4 100644 (file)
@@ -30,7 +30,8 @@ class MalformedTitleException extends Exception {
        /**
         * @param string $errorMessage Localisation message describing the error (since MW 1.26)
         * @param string $titleText The invalid title text (since MW 1.26)
-        * @param string[] $errorMessageParameters Additional parameters for the error message. $titleText will be appended if it's not null. (since MW 1.26)
+        * @param string[] $errorMessageParameters Additional parameters for the error message.
+        * $titleText will be appended if it's not null. (since MW 1.26)
         */
        public function __construct( $errorMessage = null, $titleText = null, $errorMessageParameters = array() ) {
                $this->errorMessage = $errorMessage;