Update mediawiki/mediawiki-codesniffer to 0.7.1
authorPaladox <thomasmulhall410@yahoo.com>
Fri, 6 May 2016 20:25:56 +0000 (21:25 +0100)
committerHashar <hashar@free.fr>
Sat, 7 May 2016 07:24:04 +0000 (07:24 +0000)
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

composer.json
includes/DefaultSettings.php
includes/DummyLinker.php
includes/skins/Skin.php
includes/user/User.php
tests/phpunit/includes/changes/RecentChangeTest.php
tests/phpunit/includes/page/WikiCategoryPageTest.php

index 885a66b..b614a4c 100644 (file)
@@ -46,7 +46,7 @@
        "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",
index d65e0ad..b7f487e 100644 (file)
@@ -7291,7 +7291,7 @@ $wgActionFilteredLogs = [
        ],
        'newusers' => [
                'create' => [ 'create', 'newusers' ],
-               'create2' => ['create2' ],
+               'create2' => [ 'create2' ],
                'autocreate' => [ 'autocreate' ],
                'byemail' => [ 'byemail' ],
        ],
@@ -7303,7 +7303,7 @@ $wgActionFilteredLogs = [
                'protect' => [ 'protect' ],
                'modify' => [ 'modify' ],
                'unprotect' => [ 'unprotect' ],
-               'move_prot' => ['move_prot'],
+               'move_prot' => [ 'move_prot' ],
        ],
        'rights' => [
                'rights' => [ 'rights' ],
index 45535ce..6545c4a 100644 (file)
@@ -54,9 +54,9 @@ class DummyLinker {
        public function link(
                $target,
                $html = null,
-               $customAttribs = [ ],
-               $query = [ ],
-               $options = [ ]
+               $customAttribs = [],
+               $query = [],
+               $options = []
        ) {
                return Linker::link(
                        $target,
@@ -70,8 +70,8 @@ class DummyLinker {
        public function linkKnown(
                $target,
                $html = null,
-               $customAttribs = [ ],
-               $query = [ ],
+               $customAttribs = [],
+               $query = [],
                $options = [ 'known', 'noclasses' ]
        ) {
                return Linker::linkKnown(
@@ -123,8 +123,8 @@ class DummyLinker {
                Parser $parser,
                Title $title,
                $file,
-               $frameParams = [ ],
-               $handlerParams = [ ],
+               $frameParams = [],
+               $handlerParams = [],
                $time = false,
                $query = "",
                $widthOption = null
@@ -147,7 +147,7 @@ class DummyLinker {
                $label = '',
                $alt,
                $align = 'right',
-               $params = [ ],
+               $params = [],
                $framed = false,
                $manualthumb = ""
        ) {
@@ -166,8 +166,8 @@ class DummyLinker {
        public function makeThumbLink2(
                Title $title,
                $file,
-               $frameParams = [ ],
-               $handlerParams = [ ],
+               $frameParams = [],
+               $handlerParams = [],
                $time = false,
                $query = ""
        ) {
@@ -232,7 +232,7 @@ class DummyLinker {
                $text,
                $escape = true,
                $linktype = '',
-               $attribs = [ ],
+               $attribs = [],
                $title = null
        ) {
                return Linker::makeExternalLink(
@@ -329,7 +329,7 @@ class DummyLinker {
                Title $title,
                $text,
                $wikiId = null,
-               $options = [ ]
+               $options = []
        ) {
                return Linker::makeCommentLink(
                        $title,
@@ -471,7 +471,7 @@ class DummyLinker {
                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,
@@ -491,7 +491,7 @@ class DummyLinker {
                );
        }
 
-       public function revDeleteLink( $query = [ ], $restricted = false, $delete = true ) {
+       public function revDeleteLink( $query = [], $restricted = false, $delete = true ) {
                return Linker::revDeleteLink(
                        $query,
                        $restricted,
@@ -503,7 +503,7 @@ class DummyLinker {
                return Linker::revDeleteLinkDisabled( $delete );
        }
 
-       public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [ ] ) {
+       public function tooltipAndAccesskeyAttribs( $name, array $msgParams = [] ) {
                return Linker::tooltipAndAccesskeyAttribs(
                        $name,
                        $msgParams
index 97fffda..d70a6b9 100644 (file)
@@ -1589,8 +1589,8 @@ abstract class Skin extends ContextSource {
        public function linkKnown(
                $target,
                $html = null,
-               $customAttribs = [ ],
-               $query = [ ],
+               $customAttribs = [],
+               $query = [],
                $options = [ 'known', 'noclasses' ]
        ) {
                wfDeprecated( __METHOD__, '1.21' );
index 44d2b21..ee617a2 100644 (file)
@@ -475,7 +475,7 @@ class User implements IDBAccessObject {
         */
        protected static function getInProcessCache() {
                if ( !self::$inProcessCache ) {
-                       self::$inProcessCache = new HashBagOStuff( ['maxKeys' => 10] );
+                       self::$inProcessCache = new HashBagOStuff( [ 'maxKeys' => 10 ] );
                }
                return self::$inProcessCache;
        }
index 2efc802..45f1382 100644 (file)
@@ -161,7 +161,7 @@ class RecentChangeTest extends MediaWikiTestCase {
                $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 );
 
index d6e1d9e..9f4e1fa 100644 (file)
@@ -22,7 +22,7 @@ class WikiCategoryPageTest extends MediaWikiLangTestCase {
                $pageProps->expects( $this->once() )
                        ->method( 'getProperties' )
                        ->with( $title, 'hiddencat' )
-                       ->will( $this->returnValue( [ ] ) );
+                       ->will( $this->returnValue( [] ) );
 
                $scopedOverride = PageProps::overrideInstance( $pageProps );
 
@@ -50,7 +50,7 @@ class WikiCategoryPageTest extends MediaWikiLangTestCase {
                $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 );