$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];
}
* @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 ) {
* @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;
/**
* @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() ) {
$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 );
* 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() ) {
$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,
)
) );
/**
* @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'] ) ) {