Make lines short to pass phpcs in six files under includes/
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sat, 26 Sep 2015 18:19:00 +0000 (21:19 +0300)
committerReedy <reedy@wikimedia.org>
Sat, 26 Sep 2015 18:41:01 +0000 (18:41 +0000)
Bug: T102614
Change-Id: I91a2d4f4bf86a22c8bb466da0e2f95ea27c571a3

includes/Sanitizer.php
includes/title/MalformedTitleException.php
includes/utils/BatchRowUpdate.php
includes/widget/ComplexNamespaceInputWidget.php
includes/widget/ComplexTitleInputWidget.php
includes/widget/TitleInputWidget.php

index de63af7..3e07b04 100644 (file)
@@ -1807,7 +1807,9 @@ class Sanitizer {
                        $host = preg_replace( $strip, '', $host );
 
                        // IPv6 host names are bracketed with [].  Url-decode these.
-                       if ( substr_compare( "//%5B", $host, 0, 5 ) === 0 && preg_match( '!^//%5B([0-9A-Fa-f:.]+)%5D((:\d+)?)$!', $host, $matches ) ) {
+                       if ( substr_compare( "//%5B", $host, 0, 5 ) === 0 &&
+                               preg_match( '!^//%5B([0-9A-Fa-f:.]+)%5D((:\d+)?)$!', $host, $matches )
+                       ) {
                                $host = '//[' . $matches[1] . ']' . $matches[2];
                        }
 
index 0892ce4..5b8b643 100644 (file)
@@ -33,7 +33,9 @@ class MalformedTitleException extends Exception {
         * @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() ) {
+       public function __construct(
+               $errorMessage = null, $titleText = null, $errorMessageParameters = array()
+       ) {
                $this->errorMessage = $errorMessage;
                $this->titleText = $titleText;
                if ( $titleText !== null ) {
index a4257a5..e739be3 100644 (file)
@@ -71,7 +71,9 @@ class BatchRowUpdate {
         * @param RowUpdateGenerator $generator Generates single row updates
         *  based on the rows content
         */
-       public function __construct( BatchRowIterator $reader, BatchRowWriter $writer, RowUpdateGenerator $generator ) {
+       public function __construct(
+               BatchRowIterator $reader, BatchRowWriter $writer, RowUpdateGenerator $generator
+       ) {
                $this->reader = $reader;
                $this->writer = $writer;
                $this->generator = $generator;
index 21c5709..dc95e75 100644 (file)
@@ -22,19 +22,19 @@ class ComplexNamespaceInputWidget extends \OOUI\Widget {
 
        /**
         * @param array $config Configuration options
-        * @param array $config['namespace'] Configuration for the NamespaceInputWidget dropdown with list
-        *     of namespaces
-        * @param string $config['namespace']['includeAllValue'] If specified, add a "all namespaces"
-        *     option to the dropdown, and use this as the input value for it
-        * @param array|null $config['invert'] Configuration for the "invert selection" CheckboxInputWidget. If
-        *     null, the checkbox will not be generated.
+        * @param array $config['namespace'] Configuration for the NamespaceInputWidget
+        *  dropdown with list of namespaces
+        * @param string $config['namespace']['includeAllValue'] If specified,
+        *  add an "all namespaces" option to the dropdown, and use this as the input value for it
+        * @param array|null $config['invert'] Configuration for the "invert selection"
+        *  CheckboxInputWidget. If null, the checkbox will not be generated.
         * @param array|null $config['associated'] Configuration for the "include associated namespace"
-        *     CheckboxInputWidget. If null, the checkbox will not be generated.
-        * @param array $config['invertLabel'] Configuration for the FieldLayout with label wrapping the
-        *     "invert selection" checkbox
+        *  CheckboxInputWidget. If null, the checkbox will not be generated.
+        * @param array $config['invertLabel'] Configuration for the FieldLayout with label
+        *  wrapping the "invert selection" checkbox
         * @param string $config['invertLabel']['label'] Label text for the label
-        * @param array $config['associatedLabel'] Configuration for the FieldLayout with label wrapping
-        *     the "include associated namespace" checkbox
+        * @param array $config['associatedLabel'] Configuration for the FieldLayout with label
+        *  wrapping the "include associated namespace" checkbox
         * @param string $config['associatedLabel']['label'] Label text for the label
         */
        public function __construct( array $config = array() ) {
@@ -102,7 +102,16 @@ class ComplexNamespaceInputWidget extends \OOUI\Widget {
                        $config,
                        array_intersect_key(
                                $this->config,
-                               array_fill_keys( array( 'namespace', 'invert', 'invertLabel', 'associated', 'associatedLabel' ), true )
+                               array_fill_keys(
+                                       array(
+                                               'namespace',
+                                               'invert',
+                                               'invertLabel',
+                                               'associated',
+                                               'associatedLabel'
+                                       ),
+                                       true
+                               )
                        )
                );
                return parent::getConfig( $config );
index 73ef54c..ea0ef9e 100644 (file)
@@ -19,8 +19,8 @@ class ComplexTitleInputWidget extends \OOUI\Widget {
         * Like TitleInputWidget, but the namespace has to be input through a separate dropdown field.
         *
         * @param array $config Configuration options
-        * @param array $config['namespace'] Configuration for the NamespaceInputWidget dropdown with list
-        *     of namespaces
+        * @param array $config['namespace'] Configuration for the NamespaceInputWidget dropdown
+        *  with list of namespaces
         * @param array $config['title'] Configuration for the TitleInputWidget text field
         */
        public function __construct( array $config = array() ) {
@@ -42,10 +42,13 @@ class ComplexTitleInputWidget extends \OOUI\Widget {
                $this->title = new TitleInputWidget( array_merge(
                        $config['title'],
                        array(
-                               // The inner TitleInputWidget shouldn't be infusable, only the ComplexTitleInputWidget itself can be.
+                               // The inner TitleInputWidget shouldn't be infusable,
+                               // only the ComplexTitleInputWidget itself can be.
                                'infusable' => false,
                                'relative' => true,
-                               'namespace' => isset( $config['namespace']['value'] ) ? $config['namespace']['value'] : null,
+                               'namespace' => isset( $config['namespace']['value'] ) ?
+                                       $config['namespace']['value'] :
+                                       null,
                        )
                ) );
 
index 8ac7014..5550a21 100644 (file)
@@ -19,12 +19,15 @@ class TitleInputWidget extends \OOUI\TextInputWidget {
        /**
         * @param array $config Configuration options
         * @param int|null $config['namespace'] Namespace to prepend to queries
-        * @param bool|null $config['relative'] If a namespace is set, return a title relative to it (default: true)
+        * @param bool|null $config['relative'] If a namespace is set,
+        *  return a title relative to it (default: true)
         * @param bool|null $config['suggestions'] Display search suggestions (default: true)
         */
        public function __construct( array $config = array() ) {
                // Parent constructor
-               parent::__construct( array_merge( array( 'infusable' => true, 'maxLength' => 255 ), $config ) );
+               parent::__construct(
+                       array_merge( array( 'infusable' => true, 'maxLength' => 255 ), $config )
+               );
 
                // Properties, which are ignored in PHP and just shipped back to JS
                if ( isset( $config['namespace'] ) ) {