This also fixes some code style errors.
This also include a performance increase in running phpcs, performance
increase was done by addshore :).
Change-Id: I74a3d3134791ac22c332bb4fa0bc5c3662599394
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"justinrainbow/json-schema": "~1.3",
- "mediawiki/mediawiki-codesniffer": "0.6.0",
+ "mediawiki/mediawiki-codesniffer": "0.7.1",
"monolog/monolog": "~1.18.2",
"nikic/php-parser": "1.4.1",
"nmred/kafka-php": "0.1.5",
],
'newusers' => [
'create' => [ 'create', 'newusers' ],
- 'create2' => ['create2' ],
+ 'create2' => [ 'create2' ],
'autocreate' => [ 'autocreate' ],
'byemail' => [ 'byemail' ],
],
'protect' => [ 'protect' ],
'modify' => [ 'modify' ],
'unprotect' => [ 'unprotect' ],
- 'move_prot' => ['move_prot'],
+ 'move_prot' => [ 'move_prot' ],
],
'rights' => [
'rights' => [ 'rights' ],
public function link(
$target,
$html = null,
- $customAttribs = [ ],
- $query = [ ],
- $options = [ ]
+ $customAttribs = [],
+ $query = [],
+ $options = []
) {
return Linker::link(
$target,
public function linkKnown(
$target,
$html = null,
- $customAttribs = [ ],
- $query = [ ],
+ $customAttribs = [],
+ $query = [],
$options = [ 'known', 'noclasses' ]
) {
return Linker::linkKnown(
Parser $parser,
Title $title,
$file,
- $frameParams = [ ],
- $handlerParams = [ ],
+ $frameParams = [],
+ $handlerParams = [],
$time = false,
$query = "",
$widthOption = null
$label = '',
$alt,
$align = 'right',
- $params = [ ],
+ $params = [],
$framed = false,
$manualthumb = ""
) {
public function makeThumbLink2(
Title $title,
$file,
- $frameParams = [ ],
- $handlerParams = [ ],
+ $frameParams = [],
+ $handlerParams = [],
$time = false,
$query = ""
) {
$text,
$escape = true,
$linktype = '',
- $attribs = [ ],
+ $attribs = [],
$title = null
) {
return Linker::makeExternalLink(
Title $title,
$text,
$wikiId = null,
- $options = [ ]
+ $options = []
) {
return Linker::makeCommentLink(
$title,
return Linker::formatSize( $size );
}
- public function titleAttrib( $name, $options = null, array $msgParams = [ ] ) {
+ public function titleAttrib( $name, $options = null, array $msgParams = [] ) {
return Linker::titleAttrib(
$name,
$options,
);
}
- public function revDeleteLink( $query = [ ], $restricted = false, $delete = true ) {
+ public function revDeleteLink( $query = [], $restricted = false, $delete = true ) {
return Linker::revDeleteLink(
$query,
$restricted,
return Linker::revDeleteLinkDisabled( $delete );
}
- public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [ ] ) {
+ public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
return Linker::tooltipAndAccesskeyAttribs(
$name,
$msgParams
public function linkKnown(
$target,
$html = null,
- $customAttribs = [ ],
- $query = [ ],
+ $customAttribs = [],
+ $query = [],
$options = [ 'known', 'noclasses' ]
) {
wfDeprecated( __METHOD__, '1.21' );
*/
protected static function getInProcessCache() {
if ( !self::$inProcessCache ) {
- self::$inProcessCache = new HashBagOStuff( ['maxKeys' => 10] );
+ self::$inProcessCache = new HashBagOStuff( [ 'maxKeys' => 10 ] );
}
return self::$inProcessCache;
}
$pageProps->expects( $this->once() )
->method( 'getProperties' )
->with( $categoryTitle, 'hiddencat' )
- ->will( $this->returnValue( $isHidden ? [ $categoryTitle->getArticleID() => '' ] : [ ] ) );
+ ->will( $this->returnValue( $isHidden ? [ $categoryTitle->getArticleID() => '' ] : [] ) );
$scopedOverride = PageProps::overrideInstance( $pageProps );
$pageProps->expects( $this->once() )
->method( 'getProperties' )
->with( $title, 'hiddencat' )
- ->will( $this->returnValue( [ ] ) );
+ ->will( $this->returnValue( [] ) );
$scopedOverride = PageProps::overrideInstance( $pageProps );
$pageProps->expects( $this->once() )
->method( 'getProperties' )
->with( $categoryTitle, 'hiddencat' )
- ->will( $this->returnValue( $isHidden ? [ $categoryTitle->getArticleID() => '' ] : [ ] ) );
+ ->will( $this->returnValue( $isHidden ? [ $categoryTitle->getArticleID() => '' ] : [] ) );
$scopedOverride = PageProps::overrideInstance( $pageProps );