Use mediawiki-codesniffer 0.6.0
Change-Id: Ibbc42739d1bafea203c14f0ab351e7e063dc66bc
This commit is contained in:
parent
024598fcf6
commit
8a09ba2014
|
@ -61,8 +61,8 @@ class SkinVector extends SkinTemplate {
|
||||||
function setupSkinUserCss( OutputPage $out ) {
|
function setupSkinUserCss( OutputPage $out ) {
|
||||||
parent::setupSkinUserCss( $out );
|
parent::setupSkinUserCss( $out );
|
||||||
|
|
||||||
$styles = array( 'mediawiki.skinning.interface', 'skins.vector.styles' );
|
$styles = [ 'mediawiki.skinning.interface', 'skins.vector.styles' ];
|
||||||
Hooks::run( 'SkinVectorStyleModules', array( $this, &$styles ) );
|
Hooks::run( 'SkinVectorStyleModules', [ $this, &$styles ] );
|
||||||
$out->addModuleStyles( $styles );
|
$out->addModuleStyles( $styles );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ class VectorTemplate extends BaseTemplate {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
if ( is_callable( array( $this, 'getIndicators' ) ) ) {
|
if ( is_callable( [ $this, 'getIndicators' ] ) ) {
|
||||||
echo $this->getIndicators();
|
echo $this->getIndicators();
|
||||||
}
|
}
|
||||||
// Loose comparison with '!=' is intentional, to catch null and false too, but not '0'
|
// Loose comparison with '!=' is intentional, to catch null and false too, but not '0'
|
||||||
|
@ -180,10 +180,10 @@ class VectorTemplate extends BaseTemplate {
|
||||||
<div id="mw-head">
|
<div id="mw-head">
|
||||||
<?php $this->renderNavigation( 'PERSONAL' ); ?>
|
<?php $this->renderNavigation( 'PERSONAL' ); ?>
|
||||||
<div id="left-navigation">
|
<div id="left-navigation">
|
||||||
<?php $this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?>
|
<?php $this->renderNavigation( [ 'NAMESPACES', 'VARIANTS' ] ); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="right-navigation">
|
<div id="right-navigation">
|
||||||
<?php $this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?>
|
<?php $this->renderNavigation( [ 'VIEWS', 'ACTIONS', 'SEARCH' ] ); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="mw-panel">
|
<div id="mw-panel">
|
||||||
|
@ -316,7 +316,7 @@ class VectorTemplate extends BaseTemplate {
|
||||||
echo $this->makeListItem( $key, $val );
|
echo $this->makeListItem( $key, $val );
|
||||||
}
|
}
|
||||||
if ( $hook !== null ) {
|
if ( $hook !== null ) {
|
||||||
Hooks::run( $hook, array( &$this, true ) );
|
Hooks::run( $hook, [ &$this, true ] );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -342,7 +342,7 @@ class VectorTemplate extends BaseTemplate {
|
||||||
// If only one element was given, wrap it in an array, allowing more
|
// If only one element was given, wrap it in an array, allowing more
|
||||||
// flexible arguments
|
// flexible arguments
|
||||||
if ( !is_array( $elements ) ) {
|
if ( !is_array( $elements ) ) {
|
||||||
$elements = array( $elements );
|
$elements = [ $elements ];
|
||||||
// If there's a series of elements, reverse them when in RTL mode
|
// If there's a series of elements, reverse them when in RTL mode
|
||||||
} elseif ( $this->data['rtl'] ) {
|
} elseif ( $this->data['rtl'] ) {
|
||||||
$elements = array_reverse( $elements );
|
$elements = array_reverse( $elements );
|
||||||
|
@ -518,7 +518,7 @@ class VectorTemplate extends BaseTemplate {
|
||||||
<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
|
<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
|
||||||
<div<?php echo $this->config->get( 'VectorUseSimpleSearch' ) ? ' id="simpleSearch"' : '' ?>>
|
<div<?php echo $this->config->get( 'VectorUseSimpleSearch' ) ? ' id="simpleSearch"' : '' ?>>
|
||||||
<?php
|
<?php
|
||||||
echo $this->makeSearchInput( array( 'id' => 'searchInput' ) );
|
echo $this->makeSearchInput( [ 'id' => 'searchInput' ] );
|
||||||
echo Html::hidden( 'title', $this->get( 'searchtitle' ) );
|
echo Html::hidden( 'title', $this->get( 'searchtitle' ) );
|
||||||
// We construct two buttons (for 'go' and 'fulltext' search modes),
|
// We construct two buttons (for 'go' and 'fulltext' search modes),
|
||||||
// but only one will be visible and actionable at a time (they are
|
// but only one will be visible and actionable at a time (they are
|
||||||
|
@ -533,11 +533,11 @@ class VectorTemplate extends BaseTemplate {
|
||||||
// cause it to be used.
|
// cause it to be used.
|
||||||
echo $this->makeSearchButton(
|
echo $this->makeSearchButton(
|
||||||
'fulltext',
|
'fulltext',
|
||||||
array( 'id' => 'mw-searchButton', 'class' => 'searchButton mw-fallbackSearchButton' )
|
[ 'id' => 'mw-searchButton', 'class' => 'searchButton mw-fallbackSearchButton' ]
|
||||||
);
|
);
|
||||||
echo $this->makeSearchButton(
|
echo $this->makeSearchButton(
|
||||||
'go',
|
'go',
|
||||||
array( 'id' => 'searchButton', 'class' => 'searchButton' )
|
[ 'id' => 'searchButton', 'class' => 'searchButton' ]
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
"irc": "irc://irc.freenode.org/mediawiki"
|
"irc": "irc://irc.freenode.org/mediawiki"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3",
|
"php": ">=5.5.9",
|
||||||
"composer/installers": ">1.0.12"
|
"composer/installers": ">1.0.12"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
|
@ -35,9 +35,10 @@
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"jakub-onderka/php-parallel-lint": "0.9.*",
|
"jakub-onderka/php-parallel-lint": "0.9.*",
|
||||||
"mediawiki/mediawiki-codesniffer": "0.5.1"
|
"mediawiki/mediawiki-codesniffer": "0.6.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"fix": "phpcbf",
|
||||||
"test": [
|
"test": [
|
||||||
"parallel-lint . --exclude vendor",
|
"parallel-lint . --exclude vendor",
|
||||||
"phpcs -p -s"
|
"phpcs -p -s"
|
||||||
|
|
Loading…
Reference in New Issue