Merge "Make lines short to pass phpcs in six files under includes/"
This commit is contained in:
commit
171cd5f4ea
6 changed files with 42 additions and 21 deletions
|
|
@ -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];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)
|
||||
) );
|
||||
|
||||
|
|
|
|||
|
|
@ -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'] ) ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue