Use mediawiki-codesniffer 0.6.0

Change-Id: Ibbc42739d1bafea203c14f0ab351e7e063dc66bc
This commit is contained in:
Siebrand Mazeland 2016-03-07 14:24:27 +01:00
parent 024598fcf6
commit 8a09ba2014
3 changed files with 13 additions and 12 deletions

View File

@ -61,8 +61,8 @@ class SkinVector extends SkinTemplate {
function setupSkinUserCss( OutputPage $out ) {
parent::setupSkinUserCss( $out );
$styles = array( 'mediawiki.skinning.interface', 'skins.vector.styles' );
Hooks::run( 'SkinVectorStyleModules', array( $this, &$styles ) );
$styles = [ 'mediawiki.skinning.interface', 'skins.vector.styles' ];
Hooks::run( 'SkinVectorStyleModules', [ $this, &$styles ] );
$out->addModuleStyles( $styles );
}

View File

@ -107,7 +107,7 @@ class VectorTemplate extends BaseTemplate {
}
?>
<?php
if ( is_callable( array( $this, 'getIndicators' ) ) ) {
if ( is_callable( [ $this, 'getIndicators' ] ) ) {
echo $this->getIndicators();
}
// 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">
<?php $this->renderNavigation( 'PERSONAL' ); ?>
<div id="left-navigation">
<?php $this->renderNavigation( array( 'NAMESPACES', 'VARIANTS' ) ); ?>
<?php $this->renderNavigation( [ 'NAMESPACES', 'VARIANTS' ] ); ?>
</div>
<div id="right-navigation">
<?php $this->renderNavigation( array( 'VIEWS', 'ACTIONS', 'SEARCH' ) ); ?>
<?php $this->renderNavigation( [ 'VIEWS', 'ACTIONS', 'SEARCH' ] ); ?>
</div>
</div>
<div id="mw-panel">
@ -316,7 +316,7 @@ class VectorTemplate extends BaseTemplate {
echo $this->makeListItem( $key, $val );
}
if ( $hook !== null ) {
Hooks::run( $hook, array( &$this, true ) );
Hooks::run( $hook, [ &$this, true ] );
}
?>
</ul>
@ -342,7 +342,7 @@ class VectorTemplate extends BaseTemplate {
// If only one element was given, wrap it in an array, allowing more
// flexible arguments
if ( !is_array( $elements ) ) {
$elements = array( $elements );
$elements = [ $elements ];
// If there's a series of elements, reverse them when in RTL mode
} elseif ( $this->data['rtl'] ) {
$elements = array_reverse( $elements );
@ -518,7 +518,7 @@ class VectorTemplate extends BaseTemplate {
<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
<div<?php echo $this->config->get( 'VectorUseSimpleSearch' ) ? ' id="simpleSearch"' : '' ?>>
<?php
echo $this->makeSearchInput( array( 'id' => 'searchInput' ) );
echo $this->makeSearchInput( [ 'id' => 'searchInput' ] );
echo Html::hidden( 'title', $this->get( 'searchtitle' ) );
// We construct two buttons (for 'go' and 'fulltext' search modes),
// 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.
echo $this->makeSearchButton(
'fulltext',
array( 'id' => 'mw-searchButton', 'class' => 'searchButton mw-fallbackSearchButton' )
[ 'id' => 'mw-searchButton', 'class' => 'searchButton mw-fallbackSearchButton' ]
);
echo $this->makeSearchButton(
'go',
array( 'id' => 'searchButton', 'class' => 'searchButton' )
[ 'id' => 'searchButton', 'class' => 'searchButton' ]
);
?>
</div>

View File

@ -24,7 +24,7 @@
"irc": "irc://irc.freenode.org/mediawiki"
},
"require": {
"php": ">=5.3.3",
"php": ">=5.5.9",
"composer/installers": ">1.0.12"
},
"extra": {
@ -35,9 +35,10 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.*",
"mediawiki/mediawiki-codesniffer": "0.5.1"
"mediawiki/mediawiki-codesniffer": "0.6.0"
},
"scripts": {
"fix": "phpcbf",
"test": [
"parallel-lint . --exclude vendor",
"phpcs -p -s"